forkingdog / FDFullscreenPopGesture

A UINavigationController's category to enable fullscreen pop gesture with iOS7+ system style.
MIT License
5.9k stars 1.15k forks source link

Present系统原生分享框架 不兼容 , 选择短信Message的时候,导航栏cancel按钮被遮盖 #184

Open shineFoyMylove opened 6 years ago

shineFoyMylove commented 6 years ago
UIActivityViewController` *actContr = [[UIActivityViewController alloc] initWithActivityItems:@[screenImage]  applicationActivities:nil];
[self presentViewController:actContr animated:YES completion:nil];

系统原生分享,选择短信Message,Present MFMessageComposeViewController 的时候,导航栏被遮盖,导致 cancel 按钮无法点击 dismiss。 找了很久,发现当屏蔽 如下的 method 交换,恢复正常,求这个问题该如何解决?

@implementation UINavigationController (FDFullscreenPopGesture)
+ (void)load{
        SEL originalSelector = @selector(pushViewController:animated:);
        SEL swizzledSelector = @selector(fd_pushViewController:animated:);
        ........
}
three1026 commented 6 years ago
MFMessageComposeViewController *messageComposeVC = [[MFMessageComposeViewController alloc] init];
UIViewController *rootViewController = messageComposeVC.viewControllers.firstObject;
rootViewController.fd_prefersNavigationBarHidden = YES;
kaioser commented 6 years ago

试了一下午,原来是这个库的问题!!