-4

I'm trying to edit my source code on Xcode, but I keep getting an error.

Code:

// Present the mail composition interface.
[self presentModalViewController:picker animated:YES];

ERROR: 'presentModalViewController:animated:' is deprecated: first deprecated in iOS 6.0

Is there any way to fix this?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • 2
    Look at the docs for that method and lookup what deprecated means. – rmaddy Jul 04 '14 at 20:22
  • 2
    How about reading the documentation! [Deprecated UIViewController Methods](https://developer.apple.com/library/ios/documentation/uikit/reference/UIViewController_Class/DeprecationAppendix/AppendixADeprecatedAPI.html) – rckoenes Jul 04 '14 at 20:22

1 Answers1

1

Typically, using deprecated features in any programming language may not work or may result in malfunctioning software.

Wikipedia defines deprecated as:

Deprecation is an attribute applied to a computer software feature, characteristic, or practice to indicate that it should be avoided (often because it is being superseded).

In short, you shouldn't be using presentModalViewController:animated:, and that's why you're getting the error.

http://en.wikipedia.org/wiki/Deprecation