thebugcode / fixsubview

4 stars 0 forks source link

Reset UINavigationController's delegate in the UINavigationController+Consistent.m file is wrong! #1

Open gzucm opened 9 years ago

gzucm commented 9 years ago

When use UIImagePickerController, it inherit form UINavigationController. Caller may use UIImagePickerController's delegate to fetch image, however your code reset it's delegate in method - (void)safePushViewController:(UIViewController *)viewController animated:(BOOL)animated. So UIImagePickerController's delegate methods had no chance to be called. (Forgive my poor English)

applejian commented 9 years ago

remove this line can solve self.delegate = self;

thebugcode commented 9 years ago

I Would advise against using this code anymore. The method swizzling causes more issues than it solves so you should find why you are pushing or popping two view controllers and fix that.