From 0e1b435eb711d0a3e2f00d94f10cd569f159f9c5 Mon Sep 17 00:00:00 2001 From: Stephan Diederich Date: Fri, 6 Sep 2013 19:27:48 +0200 Subject: [PATCH] fix button's disabled after failed login * rename method * invert logic --- Classes/BITAuthenticationViewController.m | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Classes/BITAuthenticationViewController.m b/Classes/BITAuthenticationViewController.m index 256852274e..786b923a2c 100644 --- a/Classes/BITAuthenticationViewController.m +++ b/Classes/BITAuthenticationViewController.m @@ -217,7 +217,7 @@ } - (void)saveAction:(id)sender { - [self showLoginUI:YES]; + [self setLoginUIEnabled:NO]; __weak typeof(self) weakSelf = self; [self.delegate authenticationViewController:self @@ -234,14 +234,14 @@ otherButtonTitles:nil]; [alertView show]; typeof(self) strongSelf = weakSelf; - [strongSelf showLoginUI:NO]; + [strongSelf setLoginUIEnabled:YES]; } }]; } -- (void) showLoginUI:(BOOL) enableLoginUI { - self.navigationItem.rightBarButtonItem.enabled = !enableLoginUI; - self.tableView.userInteractionEnabled = !enableLoginUI; +- (void) setLoginUIEnabled:(BOOL) enabled { + self.navigationItem.rightBarButtonItem.enabled = !enabled; + self.tableView.userInteractionEnabled = !enabled; } @end