NOOB Question: How to create 4 * 4 table view

Discussion in 'iOS Programming' started by oceandrive, Nov 26, 2008.

  1. oceandrive macrumors newbie

    Nov 17, 2008
    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. Niiro13 macrumors 68000

    Feb 12, 2008
    No you cannot. You'll pretty much have to layout the buttons manually. It makes it easier if you use nested for loops.
  3. chbeer macrumors member


    Sep 22, 2008
    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):

    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:
  4. oceandrive thread starter macrumors newbie

    Nov 17, 2008
  5. keehun macrumors regular

    Mar 17, 2008
    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.

  6. dipaliP macrumors newbie

    Oct 6, 2008
    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