UITextAlignmentCenter
seems to be deprecated in iOS 6. What are my alternatives?
相关问题
- CoreBluetooth - Can connectPeripheral be called mu
- Scroll view scrolling up & down on button click [d
- iOS 6 facebook sdk 3.1.1 login error
- ios6 Rotation issue from landscape to portrait mod
- Syncing Database (sqlite) from WebService(Json/XML
相关文章
- XCode 4.5 giving me “SenTestingKit/SenTestKit.h” f
- UIActivity with no settings for Facebook
- NSAttributedString '\\n' ignored
- I have a UICollectionView and i want to show an im
- Passing parameter to WCF function using Objective
- iOS BLE - How to keep app active in the background
- ZxingWidget archive error on ios6.0
- Getting the error :pointer being freed was not all
You should use
NSTextAlignmentCenter
instead according to Apple's documentation.You should also use
NSTextAlignmentLeft
andNSTextAlignmentRight
instead ofUITextAlignmentLeft
andUITextAlignmentRight
, respectively.For IOS 6 you should use
NSTextAlignmentCenter
instead ofUITextAlignmentCenter
:Source
And if you want backward compatibiliy to IOS 5 also you can do this,
In Swift:
NSTextAlignment.Center
You can do
instead of
hope it helps.