Created
August 14, 2014 13:59
-
-
Save sanketfirodiya/bda1914fe55314a8ef74 to your computer and use it in GitHub Desktop.
Bottom border to UITextField
This file contains hidden or 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
- (void)layoutCustomBordersForUITextFields { | |
for (UIView *view in [self.detailScrollView subviews]) { | |
if ([view isKindOfClass:[UITextField class]]) { | |
UITextField *textField = (UITextField *)view; | |
NSLog(@"textField = %d", textField.tag); | |
UIView *bottomBorder = [[UIView alloc] initWithFrame:CGRectMake(textField.frame.origin.x, textField.frame.origin.y + textField.frame.size.height - 1, 320, 1)]; | |
bottomBorder.backgroundColor = [UIColor colorWithWhite:0.800 alpha:1.000]; | |
[self.detailScrollView addSubview:bottomBorder]; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment