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.
OK, my QQ is 535596858.