Groups: self-management of membership of groups

- Custom the group view controllers with the blue color.

vector-im/riot-meta#114
This commit is contained in:
Giom Foret
2017-12-22 14:33:40 +01:00
parent 2a2ca1e1de
commit e12326c2dc
23 changed files with 106 additions and 80 deletions
@@ -68,6 +68,8 @@
self.enableBarTintColorStatusChange = NO;
self.rageShakeManager = [RageShakeManager sharedManager];
self.sectionHeaderTintColor = kRiotColorBlue;
// Keep visible the status bar by default.
isStatusBarHidden = NO;
}
@@ -131,6 +133,32 @@
- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
// Consider the main navigation controller if the current view controller is embedded inside a split view controller.
UINavigationController *mainNavigationController = self.navigationController;
if (self.splitViewController.isCollapsed && self.splitViewController.viewControllers.count)
{
mainNavigationController = self.splitViewController.viewControllers.firstObject;
}
if (mainNavigationController.navigationBar.tintColor == kRiotColorBlue)
{
// Restore default tintColor
mainNavigationController.navigationBar.tintColor = kRiotColorGreen;
}
}
- (void)viewDidLayoutSubviews
{
[super viewDidLayoutSubviews];
// Consider the main navigation controller if the current view controller is embedded inside a split view controller.
UINavigationController *mainNavigationController = self.navigationController;
if (self.splitViewController.isCollapsed && self.splitViewController.viewControllers.count)
{
mainNavigationController = self.splitViewController.viewControllers.firstObject;
}
mainNavigationController.navigationBar.tintColor = kRiotColorBlue;
}
- (void)destroy