Reputation: 17
Is there any sample project which shows multiple UITableView
functionality?
I am greatly appreciative of any guidance or help.
Upvotes: 1
Views: 4831
Reputation: 166
Please check out my blog post on this topic: http://iappexperience.com/post/23157217438/how-to-add-multiple-uitableviews-in-the-same-view.
Basically you can create a (second) UITableView and put it in the header (or wherever fits your scenario) of another UITableView. Then create a UITableViewController and hook it up with the UITableView in the header.
Upvotes: 0
Reputation: 8243
Check this Sample project, but you need to have an account to download it:
Multiple table views on a single screen
The idea is very simple all you need to do is to distinguish between the UITableView
that will trigger the delegates, for example:
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
if (tableView == tableView1)
{
[FirstDataSource count];
}
else if (tableView == tableView2)
{
[SecondeDataSource count];
}
}
Upvotes: 8