1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

NOOB Question: How to create 4 * 4 table view

Discussion in 'iPhone/iPad Programming' started by oceandrive, Nov 26, 2008.

  1. macrumors newbie

    #1
    NOOB question.

    How do I create a simple 4*4 table view ?

    Firstly can I create more than one column on each row using the UITable view ? (I remember reading it no we can not but cant find it again.)

    Here is my situation.

    Want something similar to a calculator interface but all my number buttons will not fit on the screen so I want a scrolling view for my buttons and my text field is on the top of the screen which does not scroll when I scroll my bottons.

    Can some one please guide be.

    When i started off I did not plan to have more than 8 buttons so i just used a simple view and put four buttons on each row. and a text field on top. Now I want to add one more row of bottons, so I decided to use a table view with four colums so that all the buttons will be equally spaced and if I had to add more buttons in future it will be easier for me.

    How to proceed? will appreciate if u can guide me to some sample on the apple site or any where.

    Also can someone suggest me a good book for a new Iphone programmer which would speed up the learning curve.
     
  2. macrumors 68000

    #2
    No you cannot. You'll pretty much have to layout the buttons manually. It makes it easier if you use nested for loops.
     
  3. macrumors member

    chbeer

    #3
    To learn cocoa and objective-c there is a very good book (called THE BOOK in some forums) by Aaron Hillegass (but it's not about iphone):
    http://www.amazon.com/Cocoa-Program...=sr_1_1?ie=UTF8&s=books&qid=1227770594&sr=1-1

    I heard that the book of Erica Sadun shall be good. I don't have it and didn't look at it. But maybe thats what you search for:
    http://www.amazon.com/iPhone-Develo...bs_sr_1?ie=UTF8&s=books&qid=1227770532&sr=8-1
     
  4. macrumors newbie

    #4
    Thanks all..
     
  5. macrumors regular

    #5
    I think the root cause of this issue is lack of good layout and design? What design do you have in mind? If you need to create a scroll view just to put your buttons in, I think you need to rethink your design.

    keehun
     
  6. macrumors newbie

    #6
    Create custom cell

    You can create custom cells for your table view. Refer TheElements, in that they have used custom cells for table view. You can create buttons through code for each row:)
     

Share This Page