Home > DeveloperSection > Forums > Problem with method presentModalViewController:Animated in iOS
Ailsa Singh
Ailsa Singh

Total Post:10

Points:70
Posted on    December-15-2015 12:36 AM

 iPhone iPhone  Ios  Objective C 
Ratings:


 1 Reply(s)
 258  View(s)
Rate this:

I am creating an app, in which I need to move another view using method presentModalViewController:Animated.
But I have a memory leak and a warning about the presentModalViewController:Animated being deprecated in iOS 6.
and I also get dismissModalViewController:Animated deprecated.

Can anyone tell me the method which is useable in the replacement of that method.



Tarun Kumar

Total Post:213

Points:1635
Posted on    December-15-2015 10:39 PM

Yes, the above method you specify is deprecated in iOS6. Here are related methods that are deprecated:

[[Picker presentingViewController] dismissViewControllerAnimated:YES completion:nil];

now above method is used Instead of:

[[Picker parentViewControl] dismissModalViewControllerAnimated:YES];

and

[self presentViewController:picker animated:YES completion:nil];

now above method is used Instead of:

[self presentModalViewController:picker animated:YES];

Don't want to miss updates? Please click the below button!

Follow MindStick