Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

访问相机、相册会crash闪退/报错解决方法 #103

Open
micyo202 opened this issue Apr 2, 2018 · 3 comments
Open

访问相机、相册会crash闪退/报错解决方法 #103

micyo202 opened this issue Apr 2, 2018 · 3 comments

Comments

@micyo202
Copy link

micyo202 commented Apr 2, 2018

UINavigationController+JZExtension.m 文件中57行处,将方法 - (void)jz_viewDidLoad 进行修改:

 - (void)jz_viewDidLoad {
    // 注释原有代码
    /**
      * NSAssert(!self.delegate, @"Set delegate should be invoked when viewDidLoad");
      * self.delegate = nil;
      * [self.interactivePopGestureRecognizer setValue:@NO forKey:@"canPanVertically"];
      * self.interactivePopGestureRecognizer.delegate = self.jz_navigationDelegate;
      * [self jz_viewDidLoad];
      */

    // 修改代码如下(解决访问相机/相册闪退问题)
    self.delegate = self.delegate;
    [self.interactivePopGestureRecognizer setValue:@NO forKey:@"canPanVertically"];
    self.interactivePopGestureRecognizer.delegate = self.jz_navigationDelegate;
    [self jz_viewDidLoad];
}
@semnyqu
Copy link

semnyqu commented Sep 10, 2018

我也碰到这个问题了,就是这里的代码,看不懂作者
NSAssert(!self.delegate, @"Set delegate should be invoked when viewDidLoad");
这个警告的用途

@GreatWallt
Copy link

不好使 依然崩

@GreatWallt
Copy link

用这个 goldfish0506@e73baa4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants