UITextField starts text above when height increases

I increased the height of the UITextField . The problem is that although the height increases, the text still starts at the center of textFeild. But I want the text to appear on top of the UITextField .

+7
source share
2 answers

you can use this ...

 textField.contentVerticalAlignment = UIControlContentVerticalAlignmentTop; 
+13
source

textField.contentVerticalAlignment = UIControlContentVerticalAlignment.top

This code worked for me. I am using Xcode 9. Hope it works for you!

0
source

All Articles