From f153a400634d4aa726dafd2257921b904c92824b Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 2 Apr 2018 00:31:43 +0300 Subject: multiple fixes --- Juick/ViewControllers/DiscoverViewController.m | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'Juick/ViewControllers/DiscoverViewController.m') diff --git a/Juick/ViewControllers/DiscoverViewController.m b/Juick/ViewControllers/DiscoverViewController.m index 11010ae..3b01297 100644 --- a/Juick/ViewControllers/DiscoverViewController.m +++ b/Juick/ViewControllers/DiscoverViewController.m @@ -28,7 +28,8 @@ AppDelegate *appDelegate; if (success) { if ([self.path length] == 0) { self.path = [APIClient feedUrl]; - [self.navigationController.visibleViewController setTitle:@"My feed"]; + [self.tabBarItem setTitle:@"My feed"]; + self.navigationController.visibleViewController.navigationItem.title = @"My feed"; } [self refreshData:NO]; } else { @@ -39,7 +40,8 @@ AppDelegate *appDelegate; } else { if ([self.path length] == 0) { self.path = [APIClient messagesUrl]; - [self.navigationController.visibleViewController setTitle:@"Discover"]; + [self.tabBarItem setTitle:@"Discover"]; + self.navigationController.visibleViewController.navigationItem.title = @"Discover"; } [self refreshData:NO]; } @@ -81,24 +83,27 @@ AppDelegate *appDelegate; UIAlertController *filterAlert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet]; [filterAlert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]]; [filterAlert addAction:[UIAlertAction actionWithTitle:@"My feed" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { - [self.navigationController.visibleViewController setTitle:@"My feed"]; self.path = [APIClient feedUrl]; + [self.tabBarItem setTitle:@"My feed"]; + self.navigationController.visibleViewController.navigationItem.title = @"My feed"; self.params = nil; [self.messages removeAllObjects]; [self.tableView reloadData]; [self refreshData:NO]; }]]; [filterAlert addAction:[UIAlertAction actionWithTitle:@"Discover" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { - [self.navigationController.visibleViewController setTitle:@"Discover"]; self.path = [APIClient messagesUrl]; + [self.tabBarItem setTitle:@"Discover"]; + self.navigationController.visibleViewController.navigationItem.title = @"Discover"; self.params = nil; [self.messages removeAllObjects]; [self.tableView reloadData]; [self refreshData:NO]; }]]; [filterAlert addAction:[UIAlertAction actionWithTitle:@"Discussions" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { - [self.navigationController.visibleViewController setTitle:@"Discussions"]; self.path = [APIClient discussionsUrl]; + [self.tabBarItem setTitle:@"Discussions"]; + self.navigationController.visibleViewController.navigationItem.title = @"Discussions"; self.params = nil; [self.messages removeAllObjects]; [self.tableView reloadData]; -- cgit v1.2.3