任何人有一个想法来解决这个BUG?
解决方法 上面的答案是正确的,但我认为比需要更精细,食谱是有帮助的.所以这里似乎是为我工作的:在设置并调用pageVIEwController的视图控制器中,
宣布:
@property (assign) BOol pageIsAnimating;
并在vIEwDIDLoad:
pageIsAnimating = NO;
加这个:
- (voID)pageVIEwController:(UIPageVIEwController *)pageVIEwController willTransitionToVIEwControllers:(NSArray *)pendingVIEwControllers { pageIsAnimating = YES;}
并添加几行:
- (voID)pageVIEwController:(UIPageVIEwController *)pageVIEwController dIDFinishAnimating:(BOol)finished prevIoUsVIEwControllers:(NSArray *)prevIoUsVIEwControllers TransitionCompleted:(BOol)completed { if (completed || finished) // Turn is either finished or aborted pageIsAnimating = NO; ...}
手势被拒绝提供视图控制器信息被抑制:
- (UIVIEwController *)pageVIEwController:(UIPageVIEwController *)pageVIEwController vIEwControllerAfterVIEwController:(UIVIEwController *)vIEwController { if (pageIsAnimating) return nil; ... return after;}- (UIVIEwController *)pageVIEwController:(UIPageVIEwController *)pageVIEwController vIEwControllerBeforeVIEwController:(UIVIEwController *)vIEwController { if (pageIsAnimating) return nil; ... return before;}
哦,方向改变重置标志:
- (UIPageVIEwControllerSpineLocation)pageVIEwController:(UIPageVIEwController *)pageVIEwController spineLocationForInterfaceOrIEntation:(UIInterfaceOrIEntation)orIEntation { pageIsAnimating = NO; ...}总结
以上是内存溢出为你收集整理的ios – UIPageViewController转换’不平衡调用开始/结束外观转换’全部内容,希望文章能够帮你解决ios – UIPageViewController转换’不平衡调用开始/结束外观转换’所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)