UITextField垂直居中

 UITextField *ty=[[UITextFieldalloc] init];

 

 ty.contentVerticalAlignment =UIControlContentHorizontalAlignmentCenter;

原文地址:https://www.cnblogs.com/sgdkg/p/2914129.html