PROBLEM WITH METHOD PRESENTMODALVIEWCONTROLLER:ANIMATED IN IOS

Ailsa Singh

Total Post:24

Points:168
Posted by  Ailsa Singh
 504  View(s)
Ratings:
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.

  1. Tarun Kumar

    Post:214

    Points:1642
    Re: Problem with method presentModalViewController:Animated in iOS

    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];

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!