我整合了集合视图流程布局水平和垂直两者但现在我想在它上面执行分页概念。我想知道我能动态地这样做吗?
答案 0 :(得分:1)
检查isPagingEnabled = true
您的收藏视图。
代码样式注意:确保正确地改变您的变量。
答案 1 :(得分:0)
1.在项目中安装pod文件。
pod'CCBottomRefreshControl'
CCBottomRefreshControl / UIScrollView的+ BottomRefreshControl.h
使用以下代码添加分页。
-(void)bottomRefreshEnable{
UIRefreshControl *refreshControl;
refreshControl = [UIRefreshControl new];
refreshControl.triggerVerticalOffset = 70;
[refreshControl addTarget:self action:@selector(handleRefresh:) forControlEvents:UIControlEventValueChanged];
self.customScrollView.bottomRefreshControl = refreshControl;
}
在检测到滚动偏移时将调用的最后一个方法(我们在上面的代码中保留了70)。
- (void)handleRefresh:(UIRefreshControl *)refreshControl {
}