Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
462 views
in Technique[技术] by (71.8m points)

objective c - A Lot of Functions are deprecated - iOs 6

I have a few functions that are deprecated since iOs 6. Maybe this'll be helpful for others who also just updated to 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.

Could anyone help me how to fixed it so there wont be any deprecated functions in my project.

Thanks in Advance

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
[self presentModalViewController:pNewController animated:YES];

can be replaced by

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

The background of this change can be seen on WWDC 2012 video session #236, the evolution of view controllers on iOS.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...