Created
February 13, 2015 12:10
-
-
Save 50percentgrey/9edc18d602cf19ea0edd to your computer and use it in GitHub Desktop.
Padding UITextField iOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Quando customizamos um UITextField usando UITextStyleBorderNone o campo perde o padding-left. | |
Um pequeno hack para isso é adicionar um padding ao textfield.*/ | |
UIView *paddingView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 20)]; | |
textField.leftView = paddingView; | |
textField.leftViewMode = UITextFieldViewModeAlways; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment