How to layout two ios UITableViews, side by side?
I have a customer who wants a view layout that contains both the typical开发者_StackOverflow社区 full-width grouped-style rows, but then also another section on the same view that contains two side by side table views.
So, like this:
______________
______________
______ ______
______ ______
______ ______
______________
______________
Any clever ways to accomplish this? I realize that this kinda goes against iOS paradigms, but I want to explore options before telling the designer "no".
You could have a view controller (lets call it A), that would be responsible for text above and below the 2 tables. Then, you could add 2 view controllers to A. Each one would be responsible for each table. Although I think the interface will be a little confuse, I think its correct way of doing. For adding your view controllers to A:
Table1ViewController *table1=[Table1ViewController alloc] initWithNibName:@"Table1ViewController" bundle:nil];
[self.views addSubView:table1];
table1.frame=CGRectMake(...,...,...,...) //Here you would define how you want to position your table.
Hope it helps.
精彩评论