wangmchn / WMPageController

An easy solution to page controllers like NetEase News
MIT License
2.92k stars 627 forks source link

@liuaaaddxiaoer 下拉刷新控件你可以添加到最外层的 UIScrollView, 如 @SunShineLOL 所示 ,然后把刷新事件传递给子控制器。目前网易云及其他主流应用都是这么去实现。而不能添加到每个子控制器上了,因为这是互斥的。 #616

Closed 18094156787 closed 5 years ago

18094156787 commented 5 years ago

@liuaaaddxiaoer 下拉刷新控件你可以添加到最外层的 UIScrollView, 如 @SunShineLOL 所示 ,然后把刷新事件传递给子控制器。目前网易云及其他主流应用都是这么去实现。而不能添加到每个子控制器上了,因为这是互斥的。

如果你需要每个子控制都可以刷新,那么还是使用原来的方案吧(查看 git commit 记录),其实我是更中意目前的方案的。

Originally posted by @wanhmr in https://github.com/wangmchn/WMPageController/pull/531#issuecomment-402479204

18094156787 commented 5 years ago

我试了没有效果啊。在把该属性 @property(nonatomic, strong) WMMagicScrollView *contentView; 公开在WMStickyPageController.h中。然后添加拉下刷新是没有效果的额。 self.contentView.mj_header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{ NSLog(@"to do"); }];

18094156787 commented 5 years ago

已解决