View Full Version : NOOB Question: How to create 4 * 4 table view

Nov 26, 2008, 02:37 PM
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.

Nov 26, 2008, 05:11 PM
No you cannot. You'll pretty much have to layout the buttons manually. It makes it easier if you use nested for loops.

Nov 27, 2008, 01:23 AM
Also can someone suggest me a good book for a new Iphone programmer which would speed up the learning curve.

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:

Nov 28, 2008, 08:40 AM
Thanks all..

Nov 28, 2008, 06:49 PM
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.


Dec 2, 2008, 10:32 PM
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:)