开发者

Aligning text in the center after rotation

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜