Reputation: 107
My app features a UIWindow (inside of the AppDelegate?). Amazingly, (by mostly good luck), I've managed to get a NIB file to display inside of my AppDelegate's UIWindow. The resulting user interface which is displayed from my NIB file is comprised of three controls:
I've spent the last month trying to populate that Table. Now I'm asking here.
Please help.
Upvotes: 0
Views: 275
Reputation: 4041
create a UITableViewController subclass, then you need to set it as the datasource and delegate of the tableView, once there you just need to fill out the appropriate methods.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section;
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
Upvotes: 0
Reputation:
I recommend you take a look at Apple's View Controller Programming Guide.
Specifically, take a look at the prerequisites section (delegate objects, and Model-View-Controller).
Once you have a basic understanding of how view controllers and delegation work, look at (and implement) the UITableViewDelegate and UITableViewDataSource protocols. The basic way to do this is to create a UITableViewController class - XCode has a template for this class with stubbed methods.
Upvotes: 2