开发者

How to layout two ios UITableViews, side by side?

开发者 https://www.devze.com 2023-03-05 10:23 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号