Reputation: 1549
I'm beginner in Iphone!
Can I place many UITableView (greater 1) in a View? And how to control them?
Upvotes: 2
Views: 141
Reputation: 8114
Well its not a good idea to have multiple tableviews in a view but if you want it you can have them and control the by there names like
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
if(tableView == declaredTableView1){
return 10;
}
else if(tableView == declaredTableView2){
return 11;
}
else {
return 12;
}
}
Hope this helps.
Upvotes: 0
Reputation: 85522
You can place as many UITableViews into a parent view, but it's probably not a good idea. Each delegate and datasource method for a tableView takes that tableView as its first argument, so it's easy to tell them apart.
Upvotes: 1