iOS开发 StoryBoard使用FDFullscreenPo

2017-10-27  本文已影响47人  LearningCoding

在使用纯代码时:
隐藏 NavigationBar 的界面
navigationController.fd_fullscreenPopGestureRecognizer.enabled = NO;
viewController.fd_interactivePopDisabled = YES;
使用 SB 时:
隐藏 NavigationBar


image.png
image.png

fd_prefersNavigationBarHidden
fd_interactivePopMaxAllowedInitialDistanceToLeftEdge

使用ScrollView,在 .m 代码里加入

- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
    if (self.contentOffset.x <= 0) {
        if ([otherGestureRecognizer.delegate isKindOfClass:NSClassFromString(@"_FDFullscreenPopGestureRecognizerDelegate")]) {
            return YES;
        }
    }
    return NO;
}
上一篇 下一篇

猜你喜欢

热点阅读