Skip to content

Instantly share code, notes, and snippets.

@cjazz
Created January 2, 2016 15:04
Show Gist options
  • Save cjazz/84a36661574016cda85b to your computer and use it in GitHub Desktop.
Save cjazz/84a36661574016cda85b to your computer and use it in GitHub Desktop.
Set Required Text Fields - Red
// Set Required TextField red on the outside
// Simple Implementation:
// 1. Set a property for UITextField, ex: textField
// 2. in ViewWillAppear call [self setRequiredTextFieldStyle:self.textField];
-(void)setRequiredTextFieldStyle:(UITextField*)textField
{
textField.layer.shadowColor = [UIColor redColor].CGColor;
textField.layer.shadowRadius = 4.0;
textField.layer.shadowOpacity = 0.9;
textField.layer.shadowOffset = CGSizeZero;
textField.layer.masksToBounds = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment