【发布时间】:2011-08-09 00:54:50
【问题描述】:
你好 我正在制作这样的自定义 UITextField :
_textField.borderStyle=UITextBorderStyleNone;
_textField.backgroundColor = _color;
_textField.layer.borderColor = [[UIColor grayColor]CGColor];
_textField.layer.borderWidth = 1.0f;
_textField.layer.cornerRadius = 8.0f;
_textField.font = [UIFont systemFontOfSize:14];
我得到的结果是(图片网址)http://img402.imageshack.us/img402/4330/questionyd.jpg
问题:如何将输入文本稍微向右移动,使其不接触边框? 我想我必须定义一些 .frame 属性,但不知道是哪一个。
谢谢! 路易斯
【问题讨论】: