ios - dismissViewControllerAnimated issue with navigation -


this application code , used selecting image picker ,when image picks want dismiss current view controller, since not dismissing current view controller @ dismissal time of image picker ,

 -(ibaction)selectexitingpicture  {       self.imagepicker = [[gkimagepicker alloc] init];       self.imagepicker.cropsize = cgsizemake(296, 300);       self.imagepicker.delegate = self;       self.imagepicker.resizeablecroparea = yes;       [self presentviewcontroller:self.imagepicker.imagepickercontroller animated:yes completion:nil];  }  -(void)imagepicker:(gkimagepicker *)imagepicker pickedimage:(uiimage *)image  {       appdel.im=image;       [self hideimagepicker];  }  - (void)hideimagepicker  {       [self.imagepicker.imagepickercontroller dismissviewcontrolleranimated:yes completion:^{                             [self.navigationcontroller pushviewcontroller:viewcont animated:yes ];                          }];  } 

please me solve issue, code should want add further

you should use line dismiss pickercontroller :

[self dismissviewcontrolleranimated:yes completion:nil]; 

you may call line in both delegate methods :

- (void)imagepickercontroller:(uiimagepickercontroller *)picker didfinishpickingmediawithinfo:(nsdictionary *)info 

and

- (void)imagepickercontrollerdidcancel:(uiimagepickercontroller *)picker 

Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -