From d673c30ab3efc1008efd4e155cb500bbdaebbaa0 Mon Sep 17 00:00:00 2001 From: TakayukiHoshi1984 Date: Fri, 31 Mar 2017 15:39:57 +0900 Subject: [PATCH] =?UTF-8?q?=E5=90=84UI=E3=81=AE=E3=83=8A=E3=83=93=E3=82=B2?= =?UTF-8?q?=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3=E3=83=90=E3=83=BC=E3=81=AE?= =?UTF-8?q?=E8=89=B2=E8=AA=BF=E6=95=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - デバイスプラグイン側で全体のナビゲーションバーの色が変えられた時のために、Browser側の色に戻す。 --- .../classes/GHAddBookmarkController.m | 11 +++++++++++ .../classes/GHBookmarkTopController.m | 15 ++++++++++----- .../classes/GHBookmarkViewController.m | 14 ++++++++++---- .../classes/GHDeviceListViewController.m | 13 ++++++++++--- .../classes/GHDevicePluginDetailViewController.m | 11 +++++++++++ .../classes/GHDevicePluginTableViewController.m | 12 +++++++++++- .../classes/GHFolderCreateController.m | 11 +++++++++++ .../classes/GHFoldersListController.m | 16 +++++++++++----- .../classes/GHSettingController.m | 12 +++++++++++- .../classes/WebViewController.m | 11 +++++++++++ .../DConnectServiceListViewController.m | 8 +++++++- 11 files changed, 114 insertions(+), 20 deletions(-) diff --git a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHAddBookmarkController.m b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHAddBookmarkController.m index 418b46ae..b917e53a 100755 --- a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHAddBookmarkController.m +++ b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHAddBookmarkController.m @@ -64,6 +64,17 @@ - (void)viewDidLoad self.navigationItem.rightBarButtonItem = done; } +- (void)viewWillAppear:(BOOL)animated { + // デバイスプラグインの設定画面で、全体のナビゲーションバーの色を変えられた時のために、Browserデフォルトの色に戻す。 + self.navigationController.navigationBar.barTintColor =[UIColor whiteColor]; + self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor blackColor]}; + [UINavigationBar appearance].barTintColor = [UIColor whiteColor]; + [UINavigationBar appearance].tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + [UITabBar appearance].translucent = NO; + [UITabBar appearance].barTintColor = [UIColor whiteColor]; + [[UITabBar appearance] setTintColor:[UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]]; +} diff --git a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHBookmarkTopController.m b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHBookmarkTopController.m index 972dd337..b5407a1a 100755 --- a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHBookmarkTopController.m +++ b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHBookmarkTopController.m @@ -57,11 +57,16 @@ - (void)viewDidLoad self.folderBtn.tintColor = [UIColor colorWithWhite:0 alpha:0]; isEditing = NO; } - - -- (void)viewWillAppear:(BOOL)animated -{ - [super viewWillAppear:animated]; +- (void)viewWillAppear:(BOOL)animated { + // デバイスプラグインの設定画面で、全体のナビゲーションバーの色を変えられた時のために、Browserデフォルトの色に戻す。 + self.navigationController.navigationBar.barTintColor =[UIColor whiteColor]; + self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor blackColor]}; + [UINavigationBar appearance].barTintColor = [UIColor whiteColor]; + [UINavigationBar appearance].tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + [UITabBar appearance].translucent = NO; + [UITabBar appearance].barTintColor = [UIColor whiteColor]; + [[UITabBar appearance] setTintColor:[UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]]; //ツールバーのボタン非表示 self.navigationController.toolbarHidden = NO; [self setEdiMode:isEditing]; diff --git a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHBookmarkViewController.m b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHBookmarkViewController.m index 9a678409..d61dfa62 100755 --- a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHBookmarkViewController.m +++ b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHBookmarkViewController.m @@ -46,15 +46,21 @@ - (void)viewDidLoad } -- (void)viewWillAppear:(BOOL)animated -{ - [super viewWillAppear:animated]; +- (void)viewWillAppear:(BOOL)animated { + // デバイスプラグインの設定画面で、全体のナビゲーションバーの色を変えられた時のために、Browserデフォルトの色に戻す。 + self.navigationController.navigationBar.barTintColor =[UIColor whiteColor]; + self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor blackColor]}; + [UINavigationBar appearance].barTintColor = [UIColor whiteColor]; + [UINavigationBar appearance].tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + [UITabBar appearance].translucent = NO; + [UITabBar appearance].barTintColor = [UIColor whiteColor]; + [[UITabBar appearance] setTintColor:[UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]]; self.title = self.parent.title; [self setEdiMode:isEditing]; self.navigationController.toolbarHidden = NO; } - - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; diff --git a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHDeviceListViewController.m b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHDeviceListViewController.m index 5c3807c5..29b795be 100644 --- a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHDeviceListViewController.m +++ b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHDeviceListViewController.m @@ -173,9 +173,16 @@ - (void)viewDidLoad { self.title = @"デバイス一覧"; } -- (void)viewDidAppear:(BOOL)animated -{ - [super viewDidAppear:animated]; +- (void)viewWillAppear:(BOOL)animated { + // デバイスプラグインの設定画面で、全体のナビゲーションバーの色を変えられた時のために、Browserデフォルトの色に戻す。 + self.navigationController.navigationBar.barTintColor =[UIColor whiteColor]; + self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor blackColor]}; + [UINavigationBar appearance].barTintColor = [UIColor whiteColor]; + [UINavigationBar appearance].tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + [UITabBar appearance].translucent = NO; + [UITabBar appearance].barTintColor = [UIColor whiteColor]; + [[UITabBar appearance] setTintColor:[UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]]; [viewModel setup]; } diff --git a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHDevicePluginDetailViewController.m b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHDevicePluginDetailViewController.m index 5d429679..f178dd25 100644 --- a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHDevicePluginDetailViewController.m +++ b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHDevicePluginDetailViewController.m @@ -40,6 +40,17 @@ - (void)viewDidLoad { self.tableView.rowHeight = UITableViewAutomaticDimension; } +- (void)viewWillAppear:(BOOL)animated { + // デバイスプラグインの設定画面で、全体のナビゲーションバーの色を変えられた時のために、Browserデフォルトの色に戻す。 + self.navigationController.navigationBar.barTintColor =[UIColor whiteColor]; + self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor blackColor]}; + [UINavigationBar appearance].barTintColor = [UIColor whiteColor]; + [UINavigationBar appearance].tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + [UITabBar appearance].translucent = NO; + [UITabBar appearance].barTintColor = [UIColor whiteColor]; + [[UITabBar appearance] setTintColor:[UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]]; +} - (void)openDevicePluginSetting { DConnectSystemProfile *systemProfile = [viewModel findSystemProfile]; diff --git a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHDevicePluginTableViewController.m b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHDevicePluginTableViewController.m index 3362c675..b51786d3 100644 --- a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHDevicePluginTableViewController.m +++ b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHDevicePluginTableViewController.m @@ -50,7 +50,17 @@ - (void)viewDidLoad { self.tableView.estimatedRowHeight = 80; self.tableView.rowHeight = UITableViewAutomaticDimension; } - +- (void)viewWillAppear:(BOOL)animated { + // デバイスプラグインの設定画面で、全体のナビゲーションバーの色を変えられた時のために、Browserデフォルトの色に戻す。 + self.navigationController.navigationBar.barTintColor =[UIColor whiteColor]; + self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor blackColor]}; + [UINavigationBar appearance].barTintColor = [UIColor whiteColor]; + [UINavigationBar appearance].tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + [UITabBar appearance].translucent = NO; + [UITabBar appearance].barTintColor = [UIColor whiteColor]; + [[UITabBar appearance] setTintColor:[UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]]; +} //--------------------------------------------------------------// #pragma mark - tableViewDelegate //--------------------------------------------------------------// diff --git a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHFolderCreateController.m b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHFolderCreateController.m index f536bb60..32a68be2 100755 --- a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHFolderCreateController.m +++ b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHFolderCreateController.m @@ -47,6 +47,17 @@ - (void)viewDidLoad [self.tableView registerNib:[UINib nibWithNibName:@"GHFolderTitleCell" bundle:nil] forCellReuseIdentifier:CELL_TITLE]; } +- (void)viewWillAppear:(BOOL)animated { + // デバイスプラグインの設定画面で、全体のナビゲーションバーの色を変えられた時のために、Browserデフォルトの色に戻す。 + self.navigationController.navigationBar.barTintColor =[UIColor whiteColor]; + self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor blackColor]}; + [UINavigationBar appearance].barTintColor = [UIColor whiteColor]; + [UINavigationBar appearance].tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + [UITabBar appearance].translucent = NO; + [UITabBar appearance].barTintColor = [UIColor whiteColor]; + [[UITabBar appearance] setTintColor:[UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]]; +} - (void)setDirectory { diff --git a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHFoldersListController.m b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHFoldersListController.m index 94dd7911..304339c3 100755 --- a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHFoldersListController.m +++ b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHFoldersListController.m @@ -47,16 +47,22 @@ - (void)viewDidLoad self.title = @"フォルダを選択"; [self setup]; } - -- (void)viewWillAppear:(BOOL)animated -{ - [super viewWillAppear:animated]; - +- (void)viewWillAppear:(BOOL)animated { + // デバイスプラグインの設定画面で、全体のナビゲーションバーの色を変えられた時のために、Browserデフォルトの色に戻す。 + self.navigationController.navigationBar.barTintColor =[UIColor whiteColor]; + self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor blackColor]}; + [UINavigationBar appearance].barTintColor = [UIColor whiteColor]; + [UINavigationBar appearance].tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + [UITabBar appearance].translucent = NO; + [UITabBar appearance].barTintColor = [UIColor whiteColor]; + [[UITabBar appearance] setTintColor:[UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]]; self.navigationController.toolbarHidden = YES; self.treeView.frame = self.view.bounds; } + - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; diff --git a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHSettingController.m b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHSettingController.m index c2159b1f..6d480ed5 100755 --- a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHSettingController.m +++ b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/GHSettingController.m @@ -65,7 +65,17 @@ - (void)viewDidLoad [super viewDidLoad]; self.title = @"設定"; } - +- (void)viewWillAppear:(BOOL)animated { + // デバイスプラグインの設定画面で、全体のナビゲーションバーの色を変えられた時のために、Browserデフォルトの色に戻す。 + self.navigationController.navigationBar.barTintColor =[UIColor whiteColor]; + self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor blackColor]}; + [UINavigationBar appearance].barTintColor = [UIColor whiteColor]; + [UINavigationBar appearance].tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + [UITabBar appearance].translucent = NO; + [UITabBar appearance].barTintColor = [UIColor whiteColor]; + [[UITabBar appearance] setTintColor:[UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]]; +} - (IBAction)close { [viewModel updateSwitchState]; diff --git a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/WebViewController.m b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/WebViewController.m index 706abebf..aadd26b5 100755 --- a/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/WebViewController.m +++ b/dConnectSDK/dConnectBrowserForIOS9/dConnectBrowserForIOS9/classes/WebViewController.m @@ -127,6 +127,17 @@ - (void)viewDidLoad action:@selector(close:)]; self.navigationItem.leftBarButtonItem = closeButton; } +- (void)viewWillAppear:(BOOL)animated { + // デバイスプラグインの設定画面で、全体のナビゲーションバーの色を変えられた時のために、Browserデフォルトの色に戻す。 + self.navigationController.navigationBar.barTintColor =[UIColor whiteColor]; + self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor blackColor]}; + [UINavigationBar appearance].barTintColor = [UIColor whiteColor]; + [UINavigationBar appearance].tintColor = [UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]; + [UITabBar appearance].translucent = NO; + [UITabBar appearance].barTintColor = [UIColor whiteColor]; + [[UITabBar appearance] setTintColor:[UIColor colorWithRed:0.000 green:0.549 blue:0.890 alpha:1.000]]; +} - (void)close:(UIBarButtonItem*)item { diff --git a/dConnectSDK/dConnectSDKForIOS/DConnectSDK/Classes/viewcontroller/DConnectServiceListViewController.m b/dConnectSDK/dConnectSDKForIOS/DConnectSDK/Classes/viewcontroller/DConnectServiceListViewController.m index e36942fe..c290ad67 100644 --- a/dConnectSDK/dConnectSDKForIOS/DConnectSDK/Classes/viewcontroller/DConnectServiceListViewController.m +++ b/dConnectSDK/dConnectSDKForIOS/DConnectSDK/Classes/viewcontroller/DConnectServiceListViewController.m @@ -49,7 +49,13 @@ - (void)viewDidLoad { } - (void)viewWillAppear:(BOOL)animated { - + // 他のデバイスプラグインで全てのナビゲーションバーの色が変えられた時のために色を設定する + self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:0.00 + green:0.63 + blue:0.91 + alpha:1.0]; + self.navigationController.navigationBar.tintColor = [UIColor whiteColor]; + self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName: [UIColor whiteColor]}; // 再表示(バックグラウンド中に通知されたDConnectServiceListener(サービス追加/削除/状態変化)がTableViewに適用されていないので再表示する) [self.tableView reloadData];