
1 hyzjshwo 2016-05-19 19:36:20 +08:00 我没实现过这样的,不过我可能会尝试 UIScrollview + UITableview ,应该可以实现吧 |
2 hyzjshwo 2016-05-19 19:38:32 +08:00 好像有简单的方法 |
3 zhlooking OP @hyzjshwo 谢谢 :) UIScrollView 内嵌套 UITableView 实现起来确实很蛋疼……简单的方法是? |
4 wj2061 2016-05-19 20:14:08 +08:00 scrollview 先设好 frame , 然后设成 tableview 的 tableHeaderView |
5 enjoeq 2016-05-19 20:19:45 +08:00 我能想到的是整个就是一个 tableview ,只是把 tableview 的 contentInset 和 indicatorInset 设为轮播图片的 view 的高度,然后再 observe tableview 的 contentOffset ,当 tableview 的 cell 向上滚动超过界限时就修改轮播图片的 origin.y ,并且同时修改 tableview 的 contentInset 和 indicatorInset 直到 0 ,大概就是这样的思路吧,不过只是猜想而已,没有实际尝试过,有错误请指正,谢谢。 |
6 cbspapapa 2016-05-19 20:21:16 +08:00 https://github.com/cbsfly 可以参考我 github 里面知乎日报的实现或者轮播广告的 demo |
7 zhlooking OP |
8 kitalphaj 2016-05-20 07:55:58 +08:00 @zhlooking 如果 headerView 不行,就可以考虑把第一个 cell 设置成轮播。我在几个 App 里面都实现过,思路很清晰也很简单。 |
9 kobe1941 2016-05-20 09:47:06 +08:00 |
10 bloodshed 2016-05-23 12:38:15 +08:00 tableViewHeader |
11 hulz413 2016-06-11 21:28:20 +08:00 我给 UIScrollView 加了个 category ,实现了无限轮播的功能,有需要可以参考下: https://github.com/hulizhen/HLZInfiniteScrollView |
12 fhefh 2016-06-16 16:43:14 +08:00 mark~~ |
13 fhefh 2016-06-16 16:47:49 +08:00 @cbspapapa https://github.com/cbsfly/CBSSegmentView 这个不错 start |