mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 11:30:50 +02:00
Navigation: Add possibility to instantiate each tab bar item controller programmatically.
This commit is contained in:
@@ -49,4 +49,7 @@
|
||||
*/
|
||||
@property (nonatomic) BOOL enableSearchBar;
|
||||
|
||||
|
||||
+ (instancetype)instantiate;
|
||||
|
||||
@end
|
||||
|
||||
@@ -46,6 +46,13 @@
|
||||
|
||||
@implementation GroupsViewController
|
||||
|
||||
+ (instancetype)instantiate
|
||||
{
|
||||
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
|
||||
GroupsViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"GroupsViewController"];
|
||||
return viewController;
|
||||
}
|
||||
|
||||
- (void)finalizeInit
|
||||
{
|
||||
[super finalizeInit];
|
||||
@@ -208,7 +215,7 @@
|
||||
}];
|
||||
|
||||
[AppDelegate theDelegate].masterTabBarController.navigationItem.title = NSLocalizedStringFromTable(@"title_groups", @"Vector", nil);
|
||||
[AppDelegate theDelegate].masterTabBarController.tabBar.tintColor = ThemeService.shared.theme.tintColor;
|
||||
[AppDelegate theDelegate].masterTabBarController.tabBar.tintColor = ThemeService.shared.theme.tintColor;
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
*/
|
||||
@interface FavouritesViewController : RecentsViewController
|
||||
|
||||
+ (instancetype)instantiate;
|
||||
|
||||
/**
|
||||
Scroll the next room with missed notifications to the top.
|
||||
*/
|
||||
|
||||
@@ -28,6 +28,13 @@
|
||||
|
||||
@implementation FavouritesViewController
|
||||
|
||||
+ (instancetype)instantiate
|
||||
{
|
||||
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
|
||||
FavouritesViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"FavouritesViewController"];
|
||||
return viewController;
|
||||
}
|
||||
|
||||
- (void)finalizeInit
|
||||
{
|
||||
[super finalizeInit];
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
*/
|
||||
@interface UnifiedSearchViewController : SegmentedViewController <UIGestureRecognizerDelegate, ContactsTableViewControllerDelegate>
|
||||
|
||||
+ (instancetype)instantiate;
|
||||
|
||||
/**
|
||||
Open the public rooms directory page.
|
||||
It uses the `publicRoomsDirectoryDataSource` managed by the recents view controller data source
|
||||
|
||||
@@ -57,6 +57,13 @@
|
||||
|
||||
@implementation UnifiedSearchViewController
|
||||
|
||||
+ (instancetype)instantiate
|
||||
{
|
||||
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
|
||||
UnifiedSearchViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"UnifiedSearchViewController"];
|
||||
return viewController;
|
||||
}
|
||||
|
||||
- (void)finalizeInit
|
||||
{
|
||||
[super finalizeInit];
|
||||
|
||||
@@ -22,4 +22,6 @@
|
||||
*/
|
||||
@interface HomeViewController : RecentsViewController <UITableViewDataSource, UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout>
|
||||
|
||||
+ (instancetype)instantiate;
|
||||
|
||||
@end
|
||||
|
||||
@@ -50,6 +50,13 @@
|
||||
|
||||
@implementation HomeViewController
|
||||
|
||||
+ (instancetype)instantiate
|
||||
{
|
||||
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
|
||||
HomeViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"HomeViewController"];
|
||||
return viewController;
|
||||
}
|
||||
|
||||
- (void)finalizeInit
|
||||
{
|
||||
[super finalizeInit];
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
*/
|
||||
@interface PeopleViewController : RecentsViewController <UITableViewDataSource, MXKDataSourceDelegate>
|
||||
|
||||
+ (instancetype)instantiate;
|
||||
|
||||
/**
|
||||
Scroll the next room with missed notifications to the top.
|
||||
*/
|
||||
|
||||
@@ -43,6 +43,13 @@
|
||||
|
||||
@implementation PeopleViewController
|
||||
|
||||
+ (instancetype)instantiate
|
||||
{
|
||||
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
|
||||
PeopleViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"PeopleViewController"];
|
||||
return viewController;
|
||||
}
|
||||
|
||||
- (void)finalizeInit
|
||||
{
|
||||
[super finalizeInit];
|
||||
|
||||
@@ -21,6 +21,8 @@
|
||||
*/
|
||||
@interface RoomsViewController : RecentsViewController
|
||||
|
||||
+ (instancetype)instantiate;
|
||||
|
||||
/**
|
||||
Scroll the next room with missed notifications to the top.
|
||||
*/
|
||||
|
||||
@@ -34,6 +34,13 @@
|
||||
|
||||
@implementation RoomsViewController
|
||||
|
||||
+ (instancetype)instantiate
|
||||
{
|
||||
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:[NSBundle mainBundle]];
|
||||
RoomsViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"RoomsViewController"];
|
||||
return viewController;
|
||||
}
|
||||
|
||||
- (void)finalizeInit
|
||||
{
|
||||
[super finalizeInit];
|
||||
|
||||
Reference in New Issue
Block a user