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];

Comments

Popular posts from this blog

UITableView - Add or Remove Rows Dynamically (Objective C & Swift Source codes)

payUmoney Payment Gateway Integration in iOS App (Objective C)

Check Internet Connectivity Using AFNetworking 2.0