UITextField vertical alignment

myTextField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
myTextField.contentVerticalAlignment = UIControlContentVerticalAlignmentTop;
myTextField.contentVerticalAlignment = UIControlContentVerticalAlignmentBottom;
myTextField.contentVerticalAlignment = UIControlContentVerticalAlignmentFill;

Source

2 Responses to “UITextField vertical alignment”

  1. Dustin says:

    Is it a private api? I don’t see it in the SDK.

    I do see
    unsigned int verticallyCenterText:1;
    Inside the private section of UITextField.

Leave a Reply