UITextField垂直居中 UITextField *ty=[[UITextFieldalloc] init]; ty.contentVerticalAlignment =UIControlContentHorizontalAlignmentCenter;