Open gzucm opened 9 years ago
remove this line can solve self.delegate = self;
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.
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)