Use protocol to get title from child VCs.

This commit is contained in:
David Langley
2022-02-23 11:41:05 +00:00
parent 3fa694552e
commit 9c53cfd4e3
8 changed files with 75 additions and 17 deletions
+8 -3
View File
@@ -20,7 +20,7 @@
#import "GeneratedInterface-Swift.h"
@interface RoomsViewController ()
@interface RoomsViewController () <MasterTabBarItemDisplayProtocol>
{
RecentsDataSource *recentsDataSource;
}
@@ -66,8 +66,6 @@
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
[AppDelegate theDelegate].masterTabBarController.navigationItem.title = [VectorL10n titleRooms];
[AppDelegate theDelegate].masterTabBarController.tabBar.tintColor = ThemeService.shared.theme.tintColor;
if ([self.dataSource isKindOfClass:RecentsDataSource.class])
@@ -165,4 +163,11 @@
}
}
#pragma mark - MasterTabBarItemDisplayProtocol
- (NSString *)masterTabBarItemTitle
{
return [VectorL10n titleRooms];
}
@end