mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-22 01:22:46 +02:00
[Spaces] Show spaces in left panel #4509
- Update title in the navigation bar according to the selected tab
This commit is contained in:
@@ -31,7 +31,7 @@
|
||||
|
||||
#import "Riot-Swift.h"
|
||||
|
||||
@interface MasterTabBarController () <AuthenticationViewControllerDelegate>
|
||||
@interface MasterTabBarController () <AuthenticationViewControllerDelegate, UITabBarControllerDelegate>
|
||||
{
|
||||
// Array of `MXSession` instances.
|
||||
NSMutableArray<MXSession*> *mxSessionArray;
|
||||
@@ -111,6 +111,8 @@
|
||||
[super viewDidLoad];
|
||||
// Do any additional setup after loading the view, typically from a nib.
|
||||
|
||||
self.delegate = self;
|
||||
|
||||
_authenticationInProgress = NO;
|
||||
|
||||
// Note: UITabBarViewController shoud not be embed in a UINavigationController (https://github.com/vector-im/riot-ios/issues/3086)
|
||||
@@ -1272,4 +1274,30 @@
|
||||
[self.masterTabBarDelegate masterTabBarControllerDidCompleteAuthentication:self];
|
||||
}
|
||||
|
||||
#pragma mark - UITabBarControllerDelegate
|
||||
|
||||
- (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController
|
||||
{
|
||||
if ([viewController isKindOfClass:HomeViewController.class])
|
||||
{
|
||||
titleLabel.text = NSLocalizedStringFromTable(@"title_home", @"Vector", nil);
|
||||
}
|
||||
else if ([viewController isKindOfClass:FavouritesViewController.class])
|
||||
{
|
||||
titleLabel.text = NSLocalizedStringFromTable(@"title_favourites", @"Vector", nil);
|
||||
}
|
||||
else if ([viewController isKindOfClass:PeopleViewController.class])
|
||||
{
|
||||
titleLabel.text = NSLocalizedStringFromTable(@"title_people", @"Vector", nil);
|
||||
}
|
||||
else if ([viewController isKindOfClass:RoomsViewController.class])
|
||||
{
|
||||
titleLabel.text = NSLocalizedStringFromTable(@"title_rooms", @"Vector", nil);
|
||||
}
|
||||
else if ([viewController isKindOfClass:GroupsViewController.class])
|
||||
{
|
||||
titleLabel.text = NSLocalizedStringFromTable(@"title_groups", @"Vector", nil);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user