masam
masam

Reputation: 2278

Deprecation of the enum UITextAlignment in favor of NSTextAlignment in iOS6

While compiling my app for iOS6 I get the following deprecation message:

From iOS 6 and later UITextAlignmentCenter is deprecated. Use NSTextAlignmentCenter instead.

Easy fix I thought, but it seems that NSTextAlignment is available in iOS 6.0 and later, and I also still want to support iOS 5. What is best practice to solve this problem?

Should I check which iOS the user is running and then use NSTextAlignment or UITextAlignment based on that?

Upvotes: 3

Views: 4008

Answers (1)

David Hoerl
David Hoerl

Reputation: 41642

Deprecated means just that - its going away in the future. If it were me, I'd just wait til your app is going to be iOS6 or newer (I assume in the next year you will do that). Its extremely unlikely for Apple to remove it before Xcode stops supporting the older release its needed in.

Upvotes: 8

Related Questions