很多功能都被弃用了 - iOs 6

Dav*_*ers 33 objective-c deprecated ios ios6

我有一些自iOs 6以来被弃用的功能.也许这对于刚刚更新到iOs 6的其他人也会有所帮助.

    [self presentModalViewController:pNewController animated:YES];
 presentModalViewController:animated is deprecated since iOs 6

 Autosynthesized property 'String' will use synthesized instance variable '_String', not existing instance variable 'String'

Autosynthesized property 'phonenumber' will use synthesized instance variable '_phonenumber', not existing instance variable 'phonenumber'


 Deprecated: Group Table View Background Color is deprecated in iOS 6.0.
Run Code Online (Sandbox Code Playgroud)

任何人都可以帮我修复它,所以在我的项目中不会有任何弃用的功能.

提前致谢

mas*_*sam 140

[self presentModalViewController:pNewController animated:YES];
Run Code Online (Sandbox Code Playgroud)

可以替换为

[self presentViewController:pNewController animated:YES completion:nil];
Run Code Online (Sandbox Code Playgroud)

这一变化的背景可以在WWDC 2012视频会议#236上看到,这是iOS上视图控制器的发展.

  • +1感谢您使用数字引用确切的视频! (3认同)

bru*_*h51 9

单击不推荐使用的方法.在右栏中,Quick Help inspector您可以看到Apple文档的快速帮助.
还建议使用更新或替代方法.