Hi there,
I would like to use and display two tables on a UI view. Please let me know how to do this. Any code same will also be appreciated.
Thanks, Sandeep
Hi there,
I would like to use and display two tables on a UI view. Please let me know how to do this. Any code same will also be appreciated.
Thanks, Sandeep
In delegate/data source methods you do the following:
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
if (tableView == myFirstTable)
// return value for 1st table
if (tableView == mySecondTable)
// return value for 2nd table
return 0;
}
or if you use tag approach:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
switch(tableView.tag){
case firstTag:
// return value for 1st table
case secondTag:
// return value for 2nd table
}
return 0;
}