4

I have a UITextfield & I am going to apply the vertical alignments to it(top,bottom,center). I done it correctly by setting the vertical alignment. But when I transform the textfield using (-M_PI/2) and apply bottom or center alignment, then it works fine but text in textfield is not visible to user. If anyone knows the solution regarding this then please help me . Thanks in advance.

4

1 回答 1

14

try may work for u

  textField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;

  textField.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
于 2012-06-18T10:43:21.693 回答