Skip to content

Instantly share code, notes, and snippets.

@sanketfirodiya
Created August 14, 2014 13:59
Show Gist options
  • Save sanketfirodiya/bda1914fe55314a8ef74 to your computer and use it in GitHub Desktop.
Save sanketfirodiya/bda1914fe55314a8ef74 to your computer and use it in GitHub Desktop.
Bottom border to UITextField
- (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