DarkAngel7 / UINavigationController-DAPowerfulCustomization

A category to expand UINavigationController, UINavigationItem and UIViewController. You can customization UINavigationBar for each view controller and enjoy your life.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TZImagePickerController conflicts

caijinming opened this issue · comments

This library and TZImagePickerController conflicts.May cause TZImagePickerController into not shut down

I think the reason is that what I'm using to realize the features I mentioned is method swizzling. So it will exchange the implementation of some methods for every UINavigationController instance and subclass instance.

The method below is what I did to avoid the problem.

- (BOOL)da_shouldUpdateBarsWithViewController:(UIViewController *)vc
{
    // Fix bugs of some system UINavigationController subclasses
    if (!vc || [vc isKindOfClass:NSClassFromString([@"PUUI" stringByAppendingString:@"ImageViewController"])] || [vc isKindOfClass:NSClassFromString([@"CAMI" stringByAppendingString:@"magePickerCameraViewController"])]) {
        return NO;
    }
    return YES;
}

What I confused is that if I use subclass to realize, there will be no conflicts, but it will be a little hard to use.
At present, I will make some changes to avoid conflicts. If you have a good idea, just pull request.

Thank you very much for your reply, can add you as a friend?For your internal implementation in some places is not very understand.

Version 1.3.5 fixed the conflicts.

OK, my QQ is 535596858.