Skip to content

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

Description

@micyo202

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];
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions