Skip to content

Commit

Permalink
use UIButtonTypeCustom to avoid flashing during label change
Browse files Browse the repository at this point in the history
  • Loading branch information
antiraum committed Dec 31, 2014
1 parent 94a0ba5 commit 1574020
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion THPinViewController/THPinView.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ - (instancetype)initWithDelegate:(id<THPinViewDelegate>)delegate
toItem:self attribute:NSLayoutAttributeCenterX
multiplier:1.0f constant:0.0f]];

_bottomButton = [UIButton buttonWithType:UIButtonTypeSystem];
_bottomButton = [UIButton buttonWithType:UIButtonTypeCustom];
_bottomButton.translatesAutoresizingMaskIntoConstraints = NO;
_bottomButton.titleLabel.font = [UIFont systemFontOfSize:16.0f];
_bottomButton.titleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
Expand Down
2 changes: 1 addition & 1 deletion THPinViewControllerExample/THViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ - (void)viewDidLoad
self.secretContentView.contentMode = UIViewContentModeScaleAspectFit;
[self.view addSubview:self.secretContentView];

self.loginLogoutButton = [UIButton buttonWithType:UIButtonTypeSystem];
self.loginLogoutButton = [UIButton buttonWithType:UIButtonTypeCustom];
self.loginLogoutButton.translatesAutoresizingMaskIntoConstraints = NO;
[self.loginLogoutButton setTitle:@"Enter PIN" forState:UIControlStateNormal];
self.loginLogoutButton.tintColor = [UIColor whiteColor];
Expand Down

0 comments on commit 1574020

Please sign in to comment.