issues
search
jasnig
/
ZJScrollPageView
网易新闻, 腾讯视频, 头条 等首页的滑块视图联动的效果OC版的简单方便的集成, 滑块 segmentVIew, scrollViewController(Providing an easy way to reach the effect that "the segment scrolls with the content")
MIT License
1.11k
stars
197
forks
source link
在子控制器点击跳转的时候为什么会走子控制器的ViewWillAppear?
#54
Closed
fuchenxi
closed
4 years ago
fuchenxi
commented
7 years ago
而且
(void)scrollPageController:(UIViewController
)scrollPageController childViewControllWillAppear:(UIViewController
)childViewController forIndex:(NSInteger)index 和- (void)zj_viewWillAppearForIndex:(NSInteger)index 也会被调用, 这个有点不解
Jayxiang
commented
7 years ago
他好像有说 ----- 请注意: 如果你希望所有的子控制器的view的系统生命周期方法被正确的调用
请重写父控制器的'shouldAutomaticallyForwardAppearanceMethods'方法 并且返回NO
当然如果你不做这个操作, 子控制器的生命周期方法将不会被正确的调用
如果你仍然想利用子控制器的生命周期方法, 请使用'ZJScrollPageViewChildVcDelegate'提供的代理方法
或者'ZJScrollPageViewDelegate'提供的代理方法 我都试了可以正常调用的
而且