From 7b43975b2bdb75b781ccb6ee2ca310be4520fb43 Mon Sep 17 00:00:00 2001 From: Ivan Sein Date: Fri, 16 Oct 2020 15:42:28 +0200 Subject: [PATCH] User branding primary color. Signed-off-by: Ivan Sein --- NextcloudTalk/AddParticipantsTableViewController.m | 7 ++++--- NextcloudTalk/AuthenticationViewController.m | 3 ++- NextcloudTalk/CCBKPasscode.m | 4 +++- NextcloudTalk/DirectoryTableViewController.m | 5 +++-- NextcloudTalk/LoginViewController.m | 4 ++-- NextcloudTalk/NCChatMessage.m | 3 ++- NextcloudTalk/NCChatViewController.m | 5 +++-- NextcloudTalk/NewRoomTableViewController.m | 7 ++++--- NextcloudTalk/QuotedMessageView.m | 4 +++- NextcloudTalk/RoomCreation2TableViewController.m | 5 +++-- NextcloudTalk/RoomCreationTableViewController.m | 7 ++++--- NextcloudTalk/RoomInfoTableViewController.m | 5 +++-- NextcloudTalk/RoomsTableViewController.m | 8 ++++---- NextcloudTalk/RoundedNumberView.m | 4 +++- NextcloudTalk/SettingsViewController.m | 6 +++--- ShareExtension/ShareConfirmationViewController.m | 7 ++++--- ShareExtension/ShareViewController.m | 7 ++++--- 17 files changed, 54 insertions(+), 37 deletions(-) diff --git a/NextcloudTalk/AddParticipantsTableViewController.m b/NextcloudTalk/AddParticipantsTableViewController.m index b771b415..d4b87b9b 100644 --- a/NextcloudTalk/AddParticipantsTableViewController.m +++ b/NextcloudTalk/AddParticipantsTableViewController.m @@ -23,6 +23,7 @@ #import "AddParticipantsTableViewController.h" #import "NCAPIController.h" +#import "NCAppBranding.h" #import "NCUserInterfaceController.h" #import "NCUtils.h" #import "PlaceholderView.h" @@ -76,7 +77,7 @@ [_searchController.searchBar sizeToFit]; if (@available(iOS 13.0, *)) { - UIColor *themeColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + UIColor *themeColor = [NCAppBranding primaryColor]; UINavigationBarAppearance *appearance = [[UINavigationBarAppearance alloc] init]; [appearance configureWithOpaqueBackground]; appearance.backgroundColor = themeColor; @@ -99,7 +100,7 @@ self.navigationItem.searchController = _searchController; _searchController.searchBar.tintColor = [UIColor whiteColor]; UITextField *searchTextField = [_searchController.searchBar valueForKey:@"searchField"]; - searchTextField.tintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + searchTextField.tintColor = [NCAppBranding primaryColor]; UIView *backgroundview = [searchTextField.subviews firstObject]; backgroundview.backgroundColor = [UIColor whiteColor]; backgroundview.layer.cornerRadius = 8; @@ -137,7 +138,7 @@ @{NSForegroundColorAttributeName:[UIColor whiteColor]}]; self.navigationController.navigationBar.tintColor = [UIColor whiteColor]; self.navigationController.navigationBar.translucent = NO; - self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + self.navigationController.navigationBar.barTintColor = [NCAppBranding primaryColor]; // Fix uisearchcontroller animation self.extendedLayoutIncludesOpaqueBars = YES; diff --git a/NextcloudTalk/AuthenticationViewController.m b/NextcloudTalk/AuthenticationViewController.m index 593c3c9a..ca0b67fd 100644 --- a/NextcloudTalk/AuthenticationViewController.m +++ b/NextcloudTalk/AuthenticationViewController.m @@ -24,6 +24,7 @@ #import "CCCertificate.h" #import "NCAPIController.h" +#import "NCAppBranding.h" #import "NCDatabaseManager.h" #import "NCSettingsController.h" @@ -84,7 +85,7 @@ NSString * const kNCAuthTokenFlowEndpoint = @"/index.php/login/flo _activityIndicatorView = [[UIActivityIndicatorView alloc] init]; _activityIndicatorView.center = self.view.center; - _activityIndicatorView.color = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + _activityIndicatorView.color = [NCAppBranding primaryColor]; [_activityIndicatorView startAnimating]; [self.view addSubview:_activityIndicatorView]; }]; diff --git a/NextcloudTalk/CCBKPasscode.m b/NextcloudTalk/CCBKPasscode.m index d5eae935..05901efc 100644 --- a/NextcloudTalk/CCBKPasscode.m +++ b/NextcloudTalk/CCBKPasscode.m @@ -23,6 +23,8 @@ #import "CCBKPasscode.h" +#import "NCAppBranding.h" + @implementation CCBKPasscode - (id)init @@ -63,7 +65,7 @@ @{NSForegroundColorAttributeName:[UIColor whiteColor]}]; self.navigationController.navigationBar.tintColor = [UIColor whiteColor]; self.navigationController.navigationBar.translucent = NO; - self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + self.navigationController.navigationBar.barTintColor = [NCAppBranding primaryColor]; } - (void)customizePasscodeInputView:(BKPasscodeInputView *)aPasscodeInputView diff --git a/NextcloudTalk/DirectoryTableViewController.m b/NextcloudTalk/DirectoryTableViewController.m index f6659594..be982e96 100644 --- a/NextcloudTalk/DirectoryTableViewController.m +++ b/NextcloudTalk/DirectoryTableViewController.m @@ -25,6 +25,7 @@ #import "DirectoryTableViewCell.h" #import "OCFileDto.h" #import "NCAPIController.h" +#import "NCAppBranding.h" #import "NCSettingsController.h" #import "NCUtils.h" #import "PlaceholderView.h" @@ -78,8 +79,8 @@ [self.navigationController.navigationBar setTitleTextAttributes: @{NSForegroundColorAttributeName:[UIColor whiteColor]}]; self.navigationController.navigationBar.tintColor = [UIColor whiteColor]; - self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 - self.tabBarController.tabBar.tintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + self.navigationController.navigationBar.barTintColor = [NCAppBranding primaryColor]; + self.tabBarController.tabBar.tintColor = [NCAppBranding primaryColor]; self.navigationController.navigationBar.translucent = NO; self.tableView.separatorInset = UIEdgeInsetsMake(0, 64, 0, 0); diff --git a/NextcloudTalk/LoginViewController.m b/NextcloudTalk/LoginViewController.m index 9d634ff4..f8d27489 100644 --- a/NextcloudTalk/LoginViewController.m +++ b/NextcloudTalk/LoginViewController.m @@ -46,7 +46,7 @@ [super viewDidLoad]; self.appLogo.image = [UIImage imageNamed:@"loginLogo"]; - self.view.backgroundColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + self.view.backgroundColor = [NCAppBranding primaryColor]; NSString *serverUrlPlaceholderText = NSLocalizedString(@"Server address https://…", nil); self.serverUrl.textColor = [UIColor whiteColor]; @@ -55,7 +55,7 @@ attributes:@{NSForegroundColorAttributeName:[UIColor colorWithWhite:1 alpha:0.5]}]; self.login.backgroundColor = [UIColor whiteColor]; - [self.login setTitleColor:[UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0] forState:UIControlStateNormal]; //#0082C9 + [self.login setTitleColor:[NCAppBranding primaryColor] forState:UIControlStateNormal]; self.activityIndicatorView.color = [UIColor whiteColor]; self.activityIndicatorView.hidden = YES; diff --git a/NextcloudTalk/NCChatMessage.m b/NextcloudTalk/NCChatMessage.m index b9769df5..abac8287 100644 --- a/NextcloudTalk/NCChatMessage.m +++ b/NextcloudTalk/NCChatMessage.m @@ -22,6 +22,7 @@ #import "NCChatMessage.h" +#import "NCAppBranding.h" #import "NCSettingsController.h" NSInteger const kChatMessageGroupTimeDifference = 30; @@ -198,7 +199,7 @@ NSInteger const kChatMessageGroupTimeDifference = 30; //Set color for mentions if ([param.type isEqualToString:@"user"] || [param.type isEqualToString:@"guest"] || [param.type isEqualToString:@"call"]) { UIColor *defaultColor = [UIColor darkGrayColor]; - UIColor *highlightedColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + UIColor *highlightedColor = [NCAppBranding primaryColor]; [attributedMessage addAttribute:NSForegroundColorAttributeName value:(param.shouldBeHighlighted) ? highlightedColor : defaultColor range:param.range]; [attributedMessage addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:16.0f] range:param.range]; } diff --git a/NextcloudTalk/NCChatViewController.m b/NextcloudTalk/NCChatViewController.m index 635db81a..25f8f57e 100644 --- a/NextcloudTalk/NCChatViewController.m +++ b/NextcloudTalk/NCChatViewController.m @@ -34,6 +34,7 @@ #import "DateHeaderView.h" #import "PlaceholderView.h" #import "NCAPIController.h" +#import "NCAppBranding.h" #import "NCChatController.h" #import "NCChatMessage.h" #import "NCDatabaseManager.h" @@ -191,7 +192,7 @@ typedef enum NCChatMessageAction { self.navigationController.navigationBar.tintColor = [UIColor whiteColor]; if (@available(iOS 13.0, *)) { - UIColor *themeColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + UIColor *themeColor = [NCAppBranding primaryColor]; UINavigationBarAppearance *appearance = [[UINavigationBarAppearance alloc] init]; [appearance configureWithOpaqueBackground]; appearance.backgroundColor = themeColor; @@ -227,7 +228,7 @@ typedef enum NCChatMessageAction { // Unread messages indicator _firstUnreadMessageIP = nil; _unreadMessageButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 126, 24)]; - _unreadMessageButton.backgroundColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1]; //#0082C9 + _unreadMessageButton.backgroundColor = [NCAppBranding primaryColor]; _unreadMessageButton.titleLabel.font = [UIFont systemFontOfSize:12]; _unreadMessageButton.layer.cornerRadius = 12; _unreadMessageButton.clipsToBounds = YES; diff --git a/NextcloudTalk/NewRoomTableViewController.m b/NextcloudTalk/NewRoomTableViewController.m index cceb9a69..4381d008 100644 --- a/NextcloudTalk/NewRoomTableViewController.m +++ b/NextcloudTalk/NewRoomTableViewController.m @@ -25,6 +25,7 @@ #import "RoomCreationTableViewController.h" #import "RoomCreation2TableViewController.h" #import "NCAPIController.h" +#import "NCAppBranding.h" #import "NCSettingsController.h" #import "NCUserInterfaceController.h" #import "NCUtils.h" @@ -73,7 +74,7 @@ NSString * const NCSelectedContactForChatNotification = @"NCSelectedContactForCh [_searchController.searchBar sizeToFit]; if (@available(iOS 13.0, *)) { - UIColor *themeColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + UIColor *themeColor = [NCAppBranding primaryColor]; UINavigationBarAppearance *appearance = [[UINavigationBarAppearance alloc] init]; [appearance configureWithOpaqueBackground]; appearance.backgroundColor = themeColor; @@ -96,7 +97,7 @@ NSString * const NCSelectedContactForChatNotification = @"NCSelectedContactForCh self.navigationItem.searchController = _searchController; _searchController.searchBar.tintColor = [UIColor whiteColor]; UITextField *searchTextField = [_searchController.searchBar valueForKey:@"searchField"]; - searchTextField.tintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + searchTextField.tintColor = [NCAppBranding primaryColor]; UIView *backgroundview = [searchTextField.subviews firstObject]; backgroundview.backgroundColor = [UIColor whiteColor]; backgroundview.layer.cornerRadius = 8; @@ -138,7 +139,7 @@ NSString * const NCSelectedContactForChatNotification = @"NCSelectedContactForCh @{NSForegroundColorAttributeName:[UIColor whiteColor]}]; self.navigationController.navigationBar.tintColor = [UIColor whiteColor]; self.navigationController.navigationBar.translucent = NO; - self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + self.navigationController.navigationBar.barTintColor = [NCAppBranding primaryColor]; } - (void)viewDidAppear:(BOOL)animated diff --git a/NextcloudTalk/QuotedMessageView.m b/NextcloudTalk/QuotedMessageView.m index 59d1737d..b107b984 100644 --- a/NextcloudTalk/QuotedMessageView.m +++ b/NextcloudTalk/QuotedMessageView.m @@ -22,6 +22,8 @@ #import "QuotedMessageView.h" +#import "NCAppBranding.h" + @interface QuotedMessageView () @property (nonatomic, strong) UIView *quoteView; @end @@ -64,7 +66,7 @@ if (!_quoteView) { _quoteView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 4, 50)]; _quoteView.translatesAutoresizingMaskIntoConstraints = NO; - _quoteView.backgroundColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1]; //#0082C9 + _quoteView.backgroundColor = [NCAppBranding primaryColor]; } return _quoteView; } diff --git a/NextcloudTalk/RoomCreation2TableViewController.m b/NextcloudTalk/RoomCreation2TableViewController.m index 1ffe57e1..09a6ef06 100644 --- a/NextcloudTalk/RoomCreation2TableViewController.m +++ b/NextcloudTalk/RoomCreation2TableViewController.m @@ -26,6 +26,7 @@ #import "RoomNameTableViewCell.h" #import "NCUser.h" #import "NCAPIController.h" +#import "NCAppBranding.h" #import "UIImageView+AFNetworking.h" typedef enum CreationSection { @@ -83,10 +84,10 @@ NSString * const NCRoomCreatedNotification = @"NCRoomCreatedNotification"; @{NSForegroundColorAttributeName:[UIColor whiteColor]}]; self.navigationController.navigationBar.tintColor = [UIColor whiteColor]; self.navigationController.navigationBar.translucent = NO; - self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + self.navigationController.navigationBar.barTintColor = [NCAppBranding primaryColor]; if (@available(iOS 13.0, *)) { - UIColor *themeColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + UIColor *themeColor = [NCAppBranding primaryColor]; UINavigationBarAppearance *appearance = [[UINavigationBarAppearance alloc] init]; [appearance configureWithOpaqueBackground]; appearance.backgroundColor = themeColor; diff --git a/NextcloudTalk/RoomCreationTableViewController.m b/NextcloudTalk/RoomCreationTableViewController.m index 3b0f281c..f5ae3f4a 100644 --- a/NextcloudTalk/RoomCreationTableViewController.m +++ b/NextcloudTalk/RoomCreationTableViewController.m @@ -23,6 +23,7 @@ #import "RoomCreationTableViewController.h" #import "NCAPIController.h" +#import "NCAppBranding.h" #import "PlaceholderView.h" #import "ResultMultiSelectionTableViewController.h" #import "RoomCreation2TableViewController.h" @@ -75,7 +76,7 @@ [_searchController.searchBar sizeToFit]; if (@available(iOS 13.0, *)) { - UIColor *themeColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + UIColor *themeColor = [NCAppBranding primaryColor]; UINavigationBarAppearance *appearance = [[UINavigationBarAppearance alloc] init]; [appearance configureWithOpaqueBackground]; appearance.backgroundColor = themeColor; @@ -98,7 +99,7 @@ self.navigationItem.searchController = _searchController; _searchController.searchBar.tintColor = [UIColor whiteColor]; UITextField *searchTextField = [_searchController.searchBar valueForKey:@"searchField"]; - searchTextField.tintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + searchTextField.tintColor = [NCAppBranding primaryColor]; UIView *backgroundview = [searchTextField.subviews firstObject]; backgroundview.backgroundColor = [UIColor whiteColor]; backgroundview.layer.cornerRadius = 8; @@ -134,7 +135,7 @@ self.navigationItem.rightBarButtonItem.accessibilityHint = NSLocalizedString(@"Continue to next step of conversation creation", nil); self.navigationController.navigationBar.tintColor = [UIColor whiteColor]; self.navigationController.navigationBar.translucent = NO; - self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + self.navigationController.navigationBar.barTintColor = [NCAppBranding primaryColor]; [self updateCounter]; diff --git a/NextcloudTalk/RoomInfoTableViewController.m b/NextcloudTalk/RoomInfoTableViewController.m index 0f911937..a4ab59c7 100644 --- a/NextcloudTalk/RoomInfoTableViewController.m +++ b/NextcloudTalk/RoomInfoTableViewController.m @@ -28,6 +28,7 @@ #import "RoomNameTableViewCell.h" #import "HeaderWithButton.h" #import "NCAPIController.h" +#import "NCAppBranding.h" #import "NCDatabaseManager.h" #import "NCRoomsManager.h" #import "NCRoomParticipant.h" @@ -126,10 +127,10 @@ typedef enum ModificationError { @{NSForegroundColorAttributeName:[UIColor whiteColor]}]; self.navigationController.navigationBar.tintColor = [UIColor whiteColor]; self.navigationController.navigationBar.translucent = NO; - self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + self.navigationController.navigationBar.barTintColor = [NCAppBranding primaryColor]; if (@available(iOS 13.0, *)) { - UIColor *themeColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + UIColor *themeColor = [NCAppBranding primaryColor]; UINavigationBarAppearance *appearance = [[UINavigationBarAppearance alloc] init]; [appearance configureWithOpaqueBackground]; appearance.backgroundColor = themeColor; diff --git a/NextcloudTalk/RoomsTableViewController.m b/NextcloudTalk/RoomsTableViewController.m index f0072066..ffb90136 100644 --- a/NextcloudTalk/RoomsTableViewController.m +++ b/NextcloudTalk/RoomsTableViewController.m @@ -91,8 +91,8 @@ typedef void (^FetchRoomsCompletionBlock)(BOOL success); [UIImageView setSharedImageDownloader:[[NCAPIController sharedInstance] imageDownloader]]; [UIButton setSharedImageDownloader:[[NCAPIController sharedInstance] imageDownloader]]; - self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 - self.tabBarController.tabBar.tintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + self.navigationController.navigationBar.barTintColor = [NCAppBranding primaryColor]; + self.tabBarController.tabBar.tintColor = [NCAppBranding primaryColor]; self.tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero]; @@ -102,7 +102,7 @@ typedef void (^FetchRoomsCompletionBlock)(BOOL success); [_searchController.searchBar sizeToFit]; if (@available(iOS 13.0, *)) { - UIColor *themeColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + UIColor *themeColor = [NCAppBranding primaryColor]; UINavigationBarAppearance *appearance = [[UINavigationBarAppearance alloc] init]; [appearance configureWithOpaqueBackground]; appearance.backgroundColor = themeColor; @@ -124,7 +124,7 @@ typedef void (^FetchRoomsCompletionBlock)(BOOL success); self.navigationItem.searchController = _searchController; _searchController.searchBar.tintColor = [UIColor whiteColor]; UITextField *searchTextField = [_searchController.searchBar valueForKey:@"searchField"]; - searchTextField.tintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + searchTextField.tintColor = [NCAppBranding primaryColor]; UIView *backgroundview = [searchTextField.subviews firstObject]; backgroundview.backgroundColor = [UIColor whiteColor]; backgroundview.layer.cornerRadius = 8; diff --git a/NextcloudTalk/RoundedNumberView.m b/NextcloudTalk/RoundedNumberView.m index 743a3983..b739dc90 100644 --- a/NextcloudTalk/RoundedNumberView.m +++ b/NextcloudTalk/RoundedNumberView.m @@ -22,6 +22,8 @@ #import "RoundedNumberView.h" +#import "NCAppBranding.h" + #define kRoundedNumberViewImportantBackgroundColor [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0] //#0082C9 #define kRoundedNumberViewImportantTextColor [UIColor whiteColor] #define kRoundedNumberViewDefaultBackgroundColor [UIColor colorWithRed:0.84 green:0.84 blue:0.84 alpha:1.0] //#d5d5d5 @@ -120,7 +122,7 @@ - (void)setImportant:(BOOL)important { _important = important; - self.backgroundColor = _important ? kRoundedNumberViewImportantBackgroundColor : kRoundedNumberViewDefaultBackgroundColor; + self.backgroundColor = _important ? [NCAppBranding primaryColor] : kRoundedNumberViewDefaultBackgroundColor; _numberColor = _important ? kRoundedNumberViewImportantTextColor : kRoundedNumberViewDefaultTextColor; } diff --git a/NextcloudTalk/SettingsViewController.m b/NextcloudTalk/SettingsViewController.m index 490ec43f..8d6c6d6a 100644 --- a/NextcloudTalk/SettingsViewController.m +++ b/NextcloudTalk/SettingsViewController.m @@ -83,11 +83,11 @@ typedef enum AboutSection { [self.navigationController.navigationBar setTitleTextAttributes: @{NSForegroundColorAttributeName:[UIColor whiteColor]}]; self.navigationController.navigationBar.tintColor = [UIColor whiteColor]; - self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 - self.tabBarController.tabBar.tintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + self.navigationController.navigationBar.barTintColor = [NCAppBranding primaryColor]; + self.tabBarController.tabBar.tintColor = [NCAppBranding primaryColor]; if (@available(iOS 13.0, *)) { - UIColor *themeColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + UIColor *themeColor = [NCAppBranding primaryColor]; UINavigationBarAppearance *appearance = [[UINavigationBarAppearance alloc] init]; [appearance configureWithOpaqueBackground]; appearance.backgroundColor = themeColor; diff --git a/ShareExtension/ShareConfirmationViewController.m b/ShareExtension/ShareConfirmationViewController.m index 61a1cb1e..385a27dc 100644 --- a/ShareExtension/ShareConfirmationViewController.m +++ b/ShareExtension/ShareConfirmationViewController.m @@ -26,6 +26,7 @@ #import "CCCertificate.h" #import "NCAPIController.h" +#import "NCAppBranding.h" #import "NCSettingsController.h" #import "NCUtils.h" #import "MBProgressHUD.h" @@ -60,11 +61,11 @@ self.navigationController.navigationBar.translucent = NO; self.navigationController.navigationBar.tintColor = [UIColor whiteColor]; - self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 - self.tabBarController.tabBar.tintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + self.navigationController.navigationBar.barTintColor = [NCAppBranding primaryColor]; + self.tabBarController.tabBar.tintColor = [NCAppBranding primaryColor]; if (@available(iOS 13.0, *)) { - UIColor *themeColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + UIColor *themeColor = [NCAppBranding primaryColor]; UINavigationBarAppearance *appearance = [[UINavigationBarAppearance alloc] init]; [appearance configureWithOpaqueBackground]; appearance.backgroundColor = themeColor; diff --git a/ShareExtension/ShareViewController.m b/ShareExtension/ShareViewController.m index 88e8c212..a5fe8e63 100644 --- a/ShareExtension/ShareViewController.m +++ b/ShareExtension/ShareViewController.m @@ -26,6 +26,7 @@ #import "CCCertificate.h" #import "NCAPIController.h" +#import "NCAppBranding.h" #import "NCDatabaseManager.h" #import "NCRoom.h" #import "NCRoomsManager.h" @@ -99,7 +100,7 @@ @{NSForegroundColorAttributeName:[UIColor whiteColor]}]; self.navigationController.navigationBar.tintColor = [UIColor whiteColor]; self.navigationController.navigationBar.translucent = NO; - self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + self.navigationController.navigationBar.barTintColor = [NCAppBranding primaryColor]; UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(cancelButtonPressed)]; @@ -107,7 +108,7 @@ self.navigationController.navigationBar.topItem.leftBarButtonItem = cancelButton; if (@available(iOS 13.0, *)) { - UIColor *themeColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + UIColor *themeColor = [NCAppBranding primaryColor]; UINavigationBarAppearance *appearance = [[UINavigationBarAppearance alloc] init]; [appearance configureWithOpaqueBackground]; appearance.backgroundColor = themeColor; @@ -130,7 +131,7 @@ self.navigationItem.searchController = _searchController; _searchController.searchBar.tintColor = [UIColor whiteColor]; UITextField *searchTextField = [_searchController.searchBar valueForKey:@"searchField"]; - searchTextField.tintColor = [UIColor colorWithRed:0.00 green:0.51 blue:0.79 alpha:1.0]; //#0082C9 + searchTextField.tintColor = [NCAppBranding primaryColor]; UIView *backgroundview = [searchTextField.subviews firstObject]; backgroundview.backgroundColor = [UIColor whiteColor]; backgroundview.layer.cornerRadius = 8;