MasterTabBarController: First step to decouple tab bar item controllers from the tab bar controller. Remove segues and instantiate authentication and unified search controllers programmatically.

This commit is contained in:
SBiOSoftWhare
2021-05-20 21:42:04 +02:00
parent 53ee6a4530
commit ba1ca38c2b
2 changed files with 160 additions and 181 deletions
+7 -8
View File
@@ -28,6 +28,7 @@
#import "RoomViewController.h"
#import "ContactDetailsViewController.h"
#import "GroupDetailsViewController.h"
#import "UnifiedSearchViewController.h"
#define TABBAR_HOME_INDEX 0
#define TABBAR_FAVOURITES_INDEX 1
@@ -45,9 +46,6 @@
// UITabBarController already have a `delegate` property
@property (weak, nonatomic) id<MasterTabBarControllerDelegate> masterTabBarDelegate;
@property (weak, nonatomic) IBOutlet UIBarButtonItem *settingsBarButtonItem;
@property (weak, nonatomic) IBOutlet UIBarButtonItem *searchBarButtonIem;
// Associated matrix sessions (empty by default).
@property (nonatomic, readonly) NSArray *mxSessions;
@@ -124,11 +122,6 @@
*/
- (void)releaseSelectedItem;
/**
Dismiss the unified search screen (if any).
*/
- (void)dismissUnifiedSearch:(BOOL)animated completion:(void (^)(void))completion;
/**
The current number of rooms with missed notifications, including the invites.
*/
@@ -168,6 +161,9 @@
@property (nonatomic, readonly) RoomsViewController *roomsViewController;
@property (nonatomic, readonly) GroupsViewController *groupsViewController;
// The current unified search screen if any
@property (nonatomic, weak) UnifiedSearchViewController *unifiedSearchViewController;
// References on the currently selected room and its view controller
@property (nonatomic, readonly) RoomViewController *currentRoomViewController;
@property (nonatomic, readonly) NSString *selectedRoomId;
@@ -188,6 +184,9 @@
// YES while the authentication screen is displayed
@property (nonatomic, readonly) BOOL authenticationInProgress;
// Set tab bar item controllers
- (void)updateViewControllers:(NSArray<UIViewController*>*)viewControllers;
@end