IPhone : [ dismissViewControllerAnimated:YES completion:nil]; not working for iOS device 7

on Wednesday, February 25, 2015

[ dismissViewControllerAnimated:YES completion:nil];


Not working for ios7 device, but its working fine for simulator. I know this question is already asked but no answer i found there. XCODE version: 6.1 Iphone 4s ios7



- (IBAction)createThread:(id)sender {

UIViewController *vc = [self presentingViewController]; //ios 5 or later
[self dismissViewControllerAnimated:YES completion: nil];

[[vc presentingViewController] dismissViewControllerAnimated:YES completion:nil];
}


Actually i want to go to 1st view controller from 3rd view controller. It worked for simulator, but in iphone 3rd view controller is disappeared but it is stuck at 2nd view controller not going to first view controller.


0 comments:

Post a Comment