答案 0 :(得分:0)
在您的customClass中使用此方法
- (CGRect)textRectForBounds:(CGRect)bounds {
return CGRectMake(bounds.origin.x + yourPading, bounds.origin.y + yourPading,
bounds.size.width - yourPading, bounds.size.height - yourPading);
}
- (CGRect)editingRectForBounds:(CGRect)bounds {
return [self textRectForBounds:bounds];
}