objective-c - ios页面布局
PHP中文网
PHP中文网 2017-04-28 09:05:46
0
2
620

问个布局的问题,整个页面可以上下滑动,圈住的地方又可以左右滑动。

我的思路:
我想的整个页面是 tableview,圈住的地方是个cell。然后cell又是个 collectionview。collectionview的一个item是个tableview
但是对于圈住的地方cell的高度 是由tableview的数据源决定的。
想问下大家有什么好的思路吗

PHP中文网
PHP中文网

认证高级PHP讲师

reply all(2)
淡淡烟草味

It is not suitable to use UITableView for the entire page. There are sliding interactions up and down, and there are subscription events. So if there is too much logic in one cell, your ViewController will become bloated and difficult to maintain.
My idea is to create a parent container ViewController for the entire page, add a childViewController


upper part

for a ViewController


lower part

add a UI for a ViewController

TableView, according to the background If the given interface has multiple network requests, it can encapsulate a ViewControllerModel.

小葫芦

The entire interface is a large scrollView, surrounded by a small scrollView. The three tableViews in the small scrollView slide horizontally (the content height of the large scrollView is the header view + the screen height, and the height of the small scrollView and tableView is the screen height). Remember to judge the tableView well. Pull-up and pull-down with large scrollView

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template