Created
February 9, 2016 19:48
-
-
Save jhonsore/86e2ee516b48ba95e0ef to your computer and use it in GitHub Desktop.
Simple input field in 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
NSString *roboto_font = @"Roboto-Regular"; | |
UITextField *input_login = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, 320, 20)]; | |
input_login.alpha = 0.1f; | |
input_login.textAlignment = NSTextAlignmentCenter; | |
input_login.textColor = [UIColor whiteColor]; | |
input_login.layer.shadowColor = [[UIColor blackColor] CGColor]; | |
input_login.layer.shadowOffset = CGSizeMake(1.0f, 1.0f); | |
input_login.layer.shadowOpacity = 1.0f; | |
input_login.layer.shadowRadius = 1.0f; | |
input_login.font = [UIFont fontWithName:roboto_font size:15]; | |
input_login.attributedPlaceholder = | |
[[NSAttributedString alloc] initWithString:value | |
attributes:@{ | |
NSForegroundColorAttributeName: [UIColor whiteColor], | |
NSFontAttributeName : [UIFont fontWithName:roboto_font size:15.0] | |
} | |
]; | |
[field addSubview:input_login]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment