Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITextField vertical text alignment on transform

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.

like image 791
Girish Avatar asked Dec 08 '22 23:12

Girish


1 Answers

try may work for u

  textField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;

  textField.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
like image 112
dayitv89 Avatar answered Dec 28 '22 10:12

dayitv89