diff --git a/NextcloudTalk.xcodeproj/project.pbxproj b/NextcloudTalk.xcodeproj/project.pbxproj index 3b0a914f..c82dba04 100644 --- a/NextcloudTalk.xcodeproj/project.pbxproj +++ b/NextcloudTalk.xcodeproj/project.pbxproj @@ -20,6 +20,9 @@ 2C06BF6720AC647A0031EB46 /* DateHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C06BF6620AC647A0031EB46 /* DateHeaderView.m */; }; 2C06BF6C20AEB0030031EB46 /* RoundedNumberView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C06BF6A20AEB0030031EB46 /* RoundedNumberView.m */; }; 2C1D13A3253760EE00EC0533 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2C1D13A1253760EE00EC0533 /* LaunchScreen.xib */; }; + 2C1EF36B25505DCE007C9768 /* NCNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C1EF36A25505DCE007C9768 /* NCNavigationController.m */; }; + 2C1EF36C25505DCE007C9768 /* NCNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C1EF36A25505DCE007C9768 /* NCNavigationController.m */; }; + 2C1EF36D25505DCE007C9768 /* NCNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C1EF36A25505DCE007C9768 /* NCNavigationController.m */; }; 2C2026A0236832D300DFC89B /* FTPopOverMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C20269F236832D300DFC89B /* FTPopOverMenu.m */; }; 2C2026A42369F47400DFC89B /* AccountTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2C2026A22369F47400DFC89B /* AccountTableViewCell.m */; }; 2C2026A52369F47400DFC89B /* AccountTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2C2026A32369F47400DFC89B /* AccountTableViewCell.xib */; }; @@ -463,6 +466,8 @@ 2C06BF6A20AEB0030031EB46 /* RoundedNumberView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RoundedNumberView.m; sourceTree = ""; }; 2C06BF6B20AEB0030031EB46 /* RoundedNumberView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RoundedNumberView.h; sourceTree = ""; }; 2C1D13A2253760EE00EC0533 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; + 2C1EF36925505DCE007C9768 /* NCNavigationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NCNavigationController.h; sourceTree = ""; }; + 2C1EF36A25505DCE007C9768 /* NCNavigationController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NCNavigationController.m; sourceTree = ""; }; 2C20269E236832D300DFC89B /* FTPopOverMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FTPopOverMenu.h; sourceTree = ""; }; 2C20269F236832D300DFC89B /* FTPopOverMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FTPopOverMenu.m; sourceTree = ""; }; 2C2026A12369F47400DFC89B /* AccountTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AccountTableViewCell.h; sourceTree = ""; }; @@ -516,7 +521,7 @@ 2C604BD7211988A700D34DCD /* SystemMessageTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SystemMessageTableViewCell.h; sourceTree = ""; }; 2C604BD8211988A700D34DCD /* SystemMessageTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SystemMessageTableViewCell.m; sourceTree = ""; }; 2C6085C11FB1063700B36A6E /* NextcloudTalk.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = NextcloudTalk.entitlements; sourceTree = ""; }; - 2C62AFA324C08845007E460A /* ShareExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = "ShareExtension.appex"; sourceTree = BUILT_PRODUCTS_DIR; }; + 2C62AFA324C08845007E460A /* ShareExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = ShareExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 2C62AFAB24C08845007E460A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 2C62AFB524C1A449007E460A /* Share.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = Share.storyboard; sourceTree = ""; }; 2C62AFB724C1A4E6007E460A /* ShareViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShareViewController.h; sourceTree = ""; }; @@ -942,6 +947,8 @@ 2CC7158820B837140045C789 /* PlaceholderView.xib */, 2C9200C12474262C0050084F /* UIBarButtonItem+Badge.h */, 2C9200C22474262C0050084F /* UIBarButtonItem+Badge.m */, + 2C1EF36925505DCE007C9768 /* NCNavigationController.h */, + 2C1EF36A25505DCE007C9768 /* NCNavigationController.m */, ); name = "User Interface"; sourceTree = ""; @@ -1871,6 +1878,7 @@ 2C78EFA91F87EF39008AFA74 /* NBMPeersFlowLayout.m in Sources */, C1292B8C237313590004C3B7 /* CCBKPasscode.m in Sources */, 2CA1CCDB1F1F6FCA002FE6A2 /* RoomTableViewCell.m in Sources */, + 2C1EF36B25505DCE007C9768 /* NCNavigationController.m in Sources */, 2CC007B420D7AE990096D91F /* ResultMultiSelectionTableViewController.m in Sources */, 2C961E1E2216BF4B00F5C23F /* OCXMLServerErrorsParser.m in Sources */, 2CA1CCC31F166CC5002FE6A2 /* NCRoom.m in Sources */, @@ -2092,6 +2100,7 @@ 2C62AFFA24C1BDA5007E460A /* NCChatMessage.m in Sources */, 2C62B00824C1BDBD007E460A /* NCConnectionController.m in Sources */, 2C62B02B24C1BDCF007E460A /* VideoSettingsViewController.m in Sources */, + 2C1EF36D25505DCE007C9768 /* NCNavigationController.m in Sources */, 2C62B01924C1BDC6007E460A /* NCRoomParticipants.m in Sources */, 2C62AFD424C1BD7E007E460A /* NSDate+RFC1123.m in Sources */, 2C62B01A24C1BDC6007E460A /* RoomSearchTableViewController.m in Sources */, @@ -2149,6 +2158,7 @@ 2CC001D524A37ACA00A20167 /* NewRoomTableViewController.m in Sources */, 2CC001BB24A37AA700A20167 /* DirectoryTableViewCell.m in Sources */, 2CC001B124A37A9500A20167 /* NCChatTitleView.m in Sources */, + 2C1EF36C25505DCE007C9768 /* NCNavigationController.m in Sources */, 2CC001CE24A37ACA00A20167 /* NCRoom.m in Sources */, 2CC0018F24A37A6B00A20167 /* NSDate+RFC1123.m in Sources */, 2CC0017124A3793700A20167 /* OCCommunication.m in Sources */, @@ -2470,7 +2480,7 @@ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = "ShareExtension/ShareExtension.entitlements"; + CODE_SIGN_ENTITLEMENTS = ShareExtension/ShareExtension.entitlements; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; @@ -2533,7 +2543,7 @@ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.nextcloud.Talk.ShareExtension; - PRODUCT_NAME = "ShareExtension"; + PRODUCT_NAME = ShareExtension; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; }; @@ -2555,7 +2565,7 @@ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; - CODE_SIGN_ENTITLEMENTS = "ShareExtension/ShareExtension.entitlements"; + CODE_SIGN_ENTITLEMENTS = ShareExtension/ShareExtension.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution: Nextcloud GmbH (NKUJUXUJ3B)"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; @@ -2617,7 +2627,7 @@ MARKETING_VERSION = 10.0.1; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = com.nextcloud.Talk.ShareExtension; - PRODUCT_NAME = "ShareExtension"; + PRODUCT_NAME = ShareExtension; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; }; diff --git a/NextcloudTalk/Base.lproj/Main.storyboard b/NextcloudTalk/Base.lproj/Main.storyboard index 290436ad..19b6b1d6 100644 --- a/NextcloudTalk/Base.lproj/Main.storyboard +++ b/NextcloudTalk/Base.lproj/Main.storyboard @@ -87,7 +87,7 @@ - + @@ -104,7 +104,7 @@ - + diff --git a/NextcloudTalk/Info.plist b/NextcloudTalk/Info.plist index b5892681..6fe60aab 100644 --- a/NextcloudTalk/Info.plist +++ b/NextcloudTalk/Info.plist @@ -76,6 +76,6 @@ UIUserInterfaceStyle Light UIViewControllerBasedStatusBarAppearance - + diff --git a/NextcloudTalk/NCNavigationController.h b/NextcloudTalk/NCNavigationController.h new file mode 100644 index 00000000..e7bc53ef --- /dev/null +++ b/NextcloudTalk/NCNavigationController.h @@ -0,0 +1,31 @@ +/** + * @copyright Copyright (c) 2020 Ivan Sein + * + * @author Ivan Sein + * + * @license GNU GPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface NCNavigationController : UINavigationController + +@end + +NS_ASSUME_NONNULL_END diff --git a/NextcloudTalk/NCNavigationController.m b/NextcloudTalk/NCNavigationController.m new file mode 100644 index 00000000..be7ebf3f --- /dev/null +++ b/NextcloudTalk/NCNavigationController.m @@ -0,0 +1,44 @@ +/** + * @copyright Copyright (c) 2020 Ivan Sein + * + * @author Ivan Sein + * + * @license GNU GPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ + +#import "NCNavigationController.h" + +#import "NCAppBranding.h" +#import "NCUtils.h" + +@interface NCNavigationController () + +@end + +@implementation NCNavigationController + +- (void)viewDidLoad { + [super viewDidLoad]; +} + +- (UIStatusBarStyle)preferredStatusBarStyle +{ + CGFloat luma = [NCUtils calculateLumaFromColor:[NCAppBranding themeColor]]; + return (luma > 0.6) ? UIStatusBarStyleDefault : UIStatusBarStyleLightContent; +} + +@end diff --git a/NextcloudTalk/RoomsTableViewController.m b/NextcloudTalk/RoomsTableViewController.m index b02c5033..7e368315 100644 --- a/NextcloudTalk/RoomsTableViewController.m +++ b/NextcloudTalk/RoomsTableViewController.m @@ -174,6 +174,8 @@ typedef void (^FetchRoomsCompletionBlock)(BOOL success); _searchController.searchBar.layer.borderWidth = 1; _searchController.searchBar.layer.borderColor = [[UIColor colorWithRed:0.94 green:0.94 blue:0.96 alpha:1.0] CGColor]; } + + [self setNeedsStatusBarAppearanceUpdate]; } - (void)dealloc