Created
November 21, 2013 19:35
-
-
Save psobko/7588106 to your computer and use it in GitHub Desktop.
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)setEmailFieldBold:(BOOL)bold animated:(BOOL)animated | |
{ | |
CGFloat fontSize = self.emailTextField.font.pointSize; | |
void (^setBold)(void) = ^{ | |
self.emailTextField.font = (bold) ? [UIFont QRBoldFontWithSize:fontSize] | |
: [UIFont QRRegularFontWithSize:fontSize]; | |
}; | |
if (!animated) | |
{ | |
[UIView transitionWithView:self.emailTextField | |
duration:0.35 | |
options:UIViewAnimationOptionTransitionCrossFade | |
animations:^{ setBold(); } | |
completion:nil]; | |
} | |
else | |
{ | |
setBold(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment