关于iOS 6 中的一些“xxxxxx” is deprecated 问题的解决办法

以UILineBreakModeTailTruncation 、UITextAlignmentCenter 举例 修改如下:

 1 #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
 2 
 3             NSLineBreakMode lbm = NSLineBreakByTruncatingTail;
 4 
 5 #else
 6 
 7             UILineBreakMode lbm = UILineBreakModeTailTruncation;
 8 
 9 #endif
10 
11 
12 
13 #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000
14 
15             NSTextAlignment ta = NSTextAlignmentCenter;
16 
17 #else
18 
19             UITextAlignment ta = UITextAlignmentCenter;
20 
21 #endif
原文地址:https://www.cnblogs.com/qiezi/p/2784475.html