Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

rodrigozanatta

macrumors newbie
Original poster
Nov 22, 2010
1
0
I have to build a UITableView windows using only the source code (without Interface Builder). I tried to find in a lot of place but didn't found any thing.

So, anyone know where I can find a sample that do this? Or anyone use this in your source code?

Tanks.
 
UITableViewController creates a tableview for you. No nib required. The only restriction is that UITableViewController wants its table to take up the full screen, except for a navbar or tabbar.

If you can make your view controller a subclass of UITableViewController that's the simplest way to do this.

Otherwise there's nothing much special about creating a table view in code. Create it. Set its frame. Set its delegate and dataSource. Add it to the view hierarchy. That's about it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.