Setting UILabel's text doesn't respect previous textAlignment configuration

Originator:marcelofabri.mf
Number:rdar://14125345 Date Originated:11-Jun-2013 11:54 PM
Status:Duplicate/14183433 Resolved:No
Product:iOS Product Version:7.0 beta
Classification:Important Reproducible:Yes
 
Summary: If a text is set on a label after textAlignment was set, the text stop respecting the textAlignment (and shows aligned to the left).

Steps to Reproduce:

1. Create an UILabel via storyboard and set its textAlignment to NSTextAlignmentCenter (on the storyboard too)
2. Create an outlet
3. Set UILabel's text on viewDidAppear

This is happening when compiling with Xcode 5 beta and iOS 7 SDK, but running on iOS 6. When I run on iOS 7, it behaves as intended.

Expected Results: The label text is align according to the value of textAlignment

Actual Results: The label text is aligned on the left

Regression: First seen on iOS 7.0 beta

Notes:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!