I am rotating the view and resizing and moving around UIT开发者_高级运维extFields when this occurs. The only problem is that the placeholder text no longer stays in the middle. What should I do? Thanks!
This appears to be a bug with UIKit. This code was executed on rotation for both portrait and landscape:
textField.textAlignment = UITextAlignmentLeft;
textField.textAlignment = UITextAlignmentCenter;
The text field's textAlignment property is moved to the left, then back to the center, almost refreshing it. If I try running the code without moving it to the left first, it doesn't work.
精彩评论