以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