I'm beginner in Iphone!
Can I place many UITableView (greater 1) in a View? And how to control them?
views:
48answers:
2
A:
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.
Ben Gottlieb
2009-12-30 04:39:44
A:
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.
Madhup
2009-12-30 05:30:20
You mean by the names of the outlet variables that refer to the table views, right?
Peter Hosey
2009-12-30 08:04:00
@peter yes I do this in this way
Madhup
2009-12-30 08:25:43
@Madhup: thank so much!
hungbm06
2010-01-04 07:02:26