TYPagerController
2016-09-26 00:36:29 0 举报
TYPagerController是一个用于实现iOS应用程序的分页控制器的开源库。它提供了一种简单而灵活的方式来管理多个视图控制器,并在用户滚动页面时自动切换它们。TYPagerController支持多种布局样式,包括水平滚动、垂直滚动和自定义布局。它还提供了一些有用的功能,如指示器、标题栏和缩略图等。使用TYPagerController可以帮助您快速构建一个具有良好用户体验的多页面应用程序。 希望这能帮到您!如果您还有其他问题,请随时问我。
作者其他创作
大纲/内容
init
is VC in cache?
Begin
remove&add VC out& in range
N
VC=visibleVC[index]
layoutSubViewsInContentView
遍历range内VC
change VC.view frame
确定visible range
updateContentViewIfNeeded
Y
is VC in dataSource?
viewWillLayoutSubviews
viewDidLoad
add VC.view to self.contentView
add VC to cache
updateContentView
is VC's parentVC is not self?
End
VC is nil?
add VC to self.childVC
根据inRange Index从不同数据源(dataSource、cache、VisibleVCs)获取VC
is index in range?
将获取到的VC分情况加入到数据源中
report VC is nil
index=range.location
从visibleVCs中删除outOfRange index 对应的VC
index++
0 条评论
下一页
为你推荐
查看更多