Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 303
David Raijmakers Avatar asked Sep 20 '12 06:09

David Raijmakers


2 Answers

[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.

like image 73
masam Avatar answered Sep 21 '22 07:09

masam


click on the method which is deprecated. in the right column Quick Help inspector you can see the Quick Help from the Apple docs.
There is also a recommandation to use updated or alternate methods.

like image 28
brush51 Avatar answered Sep 21 '22 07:09

brush51