Thursday, 24 January 2013

Methods deprecated in iOS6


In iOS 6 many methods are being deprecated.

1. For UILabel below methods are deprecated.

Deprecated in iOS6:

[self.myLabel setLineBreakMode: UILineBreakModeWordWrap];
[self.myLabel setMinimumFontSize: 14];
[self.myLabel setTextAlignment: UITextAlignmentLeft];


Implementation in iOS6:

[self.myLabel setLineBreakMode: NSLineBreakByWordWrapping];
[self.myLabel setMinimumScaleFactor: 14];
[self.myLabel setTextAlignment:NSTextAlignmentCenter];



2. For presenting and dismissing ModalViewController

Deprecated in iOS6:

[self presentModalViewController:splashViewController animated:NO];
[self dismissModalViewControllerAnimated:YES];

Implementation in iOS6:

[self presentViewController:splashViewController animated:NO completion:nil];
[self dismissViewControllerAnimated:YES completion:nil];

No comments:

Post a Comment