设置textField的内边距

it2024-12-13  16

对textField设置内边距就不是用contentInSet来进行设置了

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"];

 

转载于:https://www.cnblogs.com/yulongjiayuan/p/6026874.html

最新回复(0)