From ad3b3f924d95c4dc8f73e7c519897e263b29dabe Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Mon, 27 Feb 2017 14:45:37 -0500 Subject: [PATCH] Respond to CR. // FREEBIE --- Signal/src/util/UIViewController+OWS.h | 2 -- Signal/src/util/UIViewController+OWS.m | 14 ++------------ .../MessageComposeTableViewController.m | 6 ------ 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/Signal/src/util/UIViewController+OWS.h b/Signal/src/util/UIViewController+OWS.h index 3d5bdef3b..b95a4b48f 100644 --- a/Signal/src/util/UIViewController+OWS.h +++ b/Signal/src/util/UIViewController+OWS.h @@ -8,9 +8,7 @@ NS_ASSUME_NONNULL_BEGIN @interface UIViewController (OWS) -- (UIBarButtonItem *)createOWSBackButtonWithSelector:(SEL)selector; - (UIBarButtonItem *)createOWSBackButton; -- (void)useOWSBackButtonWithSelector:(SEL)selector; - (void)useOWSBackButton; @end diff --git a/Signal/src/util/UIViewController+OWS.m b/Signal/src/util/UIViewController+OWS.m index 7789ecfa0..238e38afa 100644 --- a/Signal/src/util/UIViewController+OWS.m +++ b/Signal/src/util/UIViewController+OWS.m @@ -8,27 +8,17 @@ NS_ASSUME_NONNULL_BEGIN @implementation UIViewController (OWS) -- (UIBarButtonItem *)createOWSBackButtonWithSelector:(SEL)selector +- (UIBarButtonItem *)createOWSBackButton { UIImage *backImage = [UIImage imageNamed:@"NavBarBack"]; OWSAssert(backImage); UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithImage:backImage style:UIBarButtonItemStylePlain target:self - action:selector]; + action:@selector(backButtonPressed:)]; return backItem; } -- (UIBarButtonItem *)createOWSBackButton -{ - return [self createOWSBackButtonWithSelector:@selector(backButtonPressed:)]; -} - -- (void)useOWSBackButtonWithSelector:(SEL)selector -{ - self.navigationItem.leftBarButtonItem = [self createOWSBackButtonWithSelector:selector]; -} - - (void)useOWSBackButton { self.navigationItem.leftBarButtonItem = [self createOWSBackButton]; diff --git a/Signal/src/view controllers/MessageComposeTableViewController.m b/Signal/src/view controllers/MessageComposeTableViewController.m index ba5a5b1b1..89e5f0e77 100644 --- a/Signal/src/view controllers/MessageComposeTableViewController.m +++ b/Signal/src/view controllers/MessageComposeTableViewController.m @@ -117,7 +117,6 @@ NSString *const MessageComposeTableViewControllerCellContact = @"ContactTableVie - (void)viewDidLoad { [super viewDidLoad]; [self.navigationController.navigationBar setTranslucent:NO]; - [self useOWSBackButtonWithSelector:@selector(closeButton:)]; self.navigationItem.rightBarButtonItem.accessibilityLabel = NSLocalizedString( @"CREATE_NEW_GROUP", @"Accessibility label for the create group new group button"); @@ -150,11 +149,6 @@ NSString *const MessageComposeTableViewControllerCellContact = @"ContactTableVie } } -- (void)closeButton:(id)sender -{ - [self dismissViewControllerAnimated:YES completion:nil]; -} - - (UILabel *)createLabelWithFirstLine:(NSString *)firstLine andSecondLine:(NSString *)secondLine { UILabel *label = [[UILabel alloc] init]; label.textColor = [UIColor grayColor];