iOS UITextField 设置内边距

[self.yourTextField setValue:[NSNumber numberWithInt:5] forKey:@"_paddingTop"];

[self.yourTextField setValue:[NSNumber numberWithInt:5] forKey:@"_paddingLeft"];

[self.yourTextField setValue:[NSNumber numberWithInt:5] forKey:@"_paddingBottom"];

[self.yourTextField setValue:[NSNumber numberWithInt:5] forKey:@"_paddingRight"];

你可能感兴趣的:(UITextField)