IOS UITextField 设置光标位置

 textField.leftView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 8, 0)] autorelease];
 textField.leftView.userInteractionEnabled = NO;
textField.leftViewMode = UITextFieldViewModeAlways; // Text 垂直居中 textField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;

 

posted @ 2013-08-27 09:41  菜鸟程序猿  阅读(9854)  评论(1编辑  收藏  举报