您好 我正在做一個自定義的UITextField像這樣:的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];
結果我得到的是(圖像URL)http://img402.imageshack.us/img402/4330/questionyd.jpg
問題:如何移動輸入文字稍微向右,所以它不會觸及邊界? 我想我必須定義一些.frame屬性,但不能確定哪一個。
謝謝! 路易
謝謝!有用 :) – 2011-04-19 22:10:19