定位發現,融雲RCPhotoPreviewCollectionViewController類雖然設置了隱藏導航欄,但最後被UINavigationController+FDFullscreenPopGesture覆蓋了,被覆蓋位置git
- (void)fd_viewWillDisappear:(BOOL)animated
{
// Forward to primary implementation.
[self fd_viewWillDisappear:animated];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
UIViewController *viewController = self.navigationController.viewControllers.lastObject;
if (viewController && !viewController.fd_prefersNavigationBarHidden) {
[self.navigationController setNavigationBarHidden:NO animated:NO];
}
});
}
複製代碼
修改UINavigationController+FDFullscreenPopGesture,過濾不處理融雲RCPhotoPreviewCollectionViewController類導航欄 github
- (void)fd_viewWillDisappear:(BOOL)animated
{
// Forward to primary implementation.
[self fd_viewWillDisappear:animated];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
UIViewController *viewController = self.navigationController.viewControllers.lastObject;
if (viewController && !viewController.fd_prefersNavigationBarHidden) {
NSString *classString = NSStringFromClass(viewController.class);
if ([classString isEqualToString:@"RCPhotoPreviewCollectionViewController"]) {return;}
[self.navigationController setNavigationBarHidden:NO animated:NO];
}
});
}
複製代碼