David Raijmakers
David Raijmakers

Reputation: 1379

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

Upvotes: 33

Views: 39250

Answers (5)

Kirit  Vaghela
Kirit Vaghela

Reputation: 12674

Use like this

[self presentViewController:object animated:YES completion:NULL];

[object dismissViewControllerAnimated:YES completion:NULL];

Upvotes: 1

tricycle
tricycle

Reputation: 190

Try this,

Open the .storyboard file or .xib file in "Source Code" mode.

Find and remove this line:

<color key="backgroundColor" cocoaTouchSystemColor="groupTableViewBackgroundColor"/>

Upvotes: 2

masam
masam

Reputation: 2278

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

Upvotes: 139

Vincent Osinga
Vincent Osinga

Reputation: 1039

I can help you with the last one: it means that the color GroupTableViewBackgroundColor is no longer supported in ios6. You probably used this in your xib files somewhere.

Upvotes: 1

brush51
brush51

Reputation: 5781

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.

Upvotes: 9

Related Questions