Is there an easy way to replace a deprecated method call in Xcode?

Posted by Alex Basson on Stack Overflow See other posts from Stack Overflow or by Alex Basson
Published on 2012-12-17T22:33:52Z Indexed on 2012/12/17 23:03 UTC
Read the original article Hit count: 190

So iOS 6 deprecates presentModalViewController:animated: and dismissModalViewControllerAnimated:, and it replaces them with presentViewController:animated:completion: and dismissViewControllerAnimated:completion:, respectively. I suppose I could use find-replace to update my app, although it would be awkward with the present* methods, since the controller to be presented is different every time. I know I could handle that situation with a regex, but I don't feel comfortable enough with regex to try using it with my 1000+-files-big app.

So I'm wondering: Does Xcode have some magic "update deprecated methods" command or something? I mean, I've described my particular situation above, but in general, deprecations come around with every OS release. Is there a better way to update an app than simply to use find-replace?

© Stack Overflow or respective owner

Related posts about xcode

Related posts about refactoring