deprecated! ‘UILineBreakModeCharacterWrap’ & ‘UITextAlignmentCenter’

Read Time:14 Second

When I use UILineBreakModeCharacterWrap, I get this message

'UILineBreakModeCharacterWrap' is deprecated

use NSLineBreakByCharWrapping instead of it.

//[label setLineBreakMode:UILineBreakModeCharacterWrap];
[label setLineBreakMode:NSLineBreakByCharWrapping];

If I use UITextAlignmentCenter, then I get

'UITextAlignmentCenter' is deprecated: first deprecated in iOS 6.0

use NSTextAlignmentCenter instead of:

//[textLabel setTextAlignment:UITextAlignmentCenter];
[textLabel setTextAlignment:NSTextAlignmentCenter];

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.