From 52f31eff42509163871d77f0d5a70e3c0586af9e Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Mon, 4 Nov 2019 15:34:32 -0500 Subject: [PATCH] header changes --- MVMCoreUI/BaseControllers/MFViewController.m | 1 - MVMCoreUI/Containers/NavigationController.swift | 15 ++++++++------- .../MVMCoreUISplitViewController.h | 5 ++--- .../MVMCoreUISplitViewController.m | 6 +++--- MVMCoreUI/MVMCoreUI.h | 2 -- MVMCoreUI/OtherHandlers/MVMCoreUISession.h | 4 ++-- MVMCoreUI/Utility/MVMCoreUIUtility.m | 1 - 7 files changed, 15 insertions(+), 19 deletions(-) diff --git a/MVMCoreUI/BaseControllers/MFViewController.m b/MVMCoreUI/BaseControllers/MFViewController.m index 2311781e..2c8e3997 100644 --- a/MVMCoreUI/BaseControllers/MFViewController.m +++ b/MVMCoreUI/BaseControllers/MFViewController.m @@ -35,7 +35,6 @@ #import "MVMCoreUISession.h" #import "MVMCoreUILoggingHandler.h" #import "MVMCoreUITabBarPageControlViewController.h" -#import "MVMCoreUINavigationController.h" #import @import MVMAnimationFramework; diff --git a/MVMCoreUI/Containers/NavigationController.swift b/MVMCoreUI/Containers/NavigationController.swift index 689ba1b5..1b551ffb 100644 --- a/MVMCoreUI/Containers/NavigationController.swift +++ b/MVMCoreUI/Containers/NavigationController.swift @@ -9,25 +9,26 @@ import UIKit @objcMembers open class NavigationController: UINavigationController { - var separatorView: SeparatorView? + public var separatorView: SeparatorView? - static func navigationController() -> Self? { + public static func navigationController() -> Self? { return MVMCoreActionUtility.initializerClassCheck(MVMCoreUISession.sharedGlobal()?.navigationController, classToVerify: self) as? Self } - /*static func setupNavigationController() -> Self? { - let navigationController = NavigationController() + public static func setupNavigationController() -> Self? { + let navigationController = self.init() UIColor.mfSetBackgroundColor(forNavigationBar: .white, navigationBar: navigationController.navigationBar, transparent: false) navigationController.navigationBar.shadowImage = UIImage() navigationController.navigationBar.isOpaque = true navigationController.navigationBar.tintColor = .black navigationController.separatorView = SeparatorView.separatorAdd(to: navigationController.navigationBar, position: SeparatorPositionBot, withHorizontalPadding: 0) navigationController.separatorView?.setAsLight() - navigationController.navigationBar.titleTextAttributes = [NSAttributedString.Key.font: MFFonts.mfFont75Bd(MFSizeObject(standardSize: 14, standardiPadPortraitSize: 16, iPadProLandscapeSize: 18)?.getValueBasedOnScreenSize() ?? 14)] - + if let font = MFFonts.mfFont75Bd(MFSizeObject(standardSize: 14, standardiPadPortraitSize: 16, iPadProLandscapeSize: 18)?.getValueBasedOnScreenSize() ?? 14) { + navigationController.navigationBar.titleTextAttributes = [NSAttributedString.Key.font: font]; + } MVMCoreUISession.sharedGlobal()?.navigationController = navigationController MVMCoreNavigationHandler.shared()?.viewControllerToPresentOn = navigationController MVMCoreNavigationHandler.shared()?.navigationController = navigationController return navigationController - }*/ + } } diff --git a/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.h b/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.h index cf27dc78..af02281d 100644 --- a/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.h +++ b/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.h @@ -11,10 +11,9 @@ @import MVMCore.MVMCoreActionDelegateProtocol; #import #import - -@class MVMCoreUINavigationController; @class MVMCoreUITopAlertView; @class MFViewController; +@class NavigationController; typedef NS_ENUM(NSInteger, MFNumberOfDrawers) { MFNoDrawer = 0, @@ -34,7 +33,7 @@ typedef NS_ENUM(NSInteger, MFNumberOfDrawers) { @property (nullable, strong, nonatomic) UIBarButtonItem *backButton; -@property (nullable, weak, nonatomic, readonly) MVMCoreUINavigationController *navigationController; +@property (nullable, weak, nonatomic, readonly) NavigationController *navigationController; // Reference to the top alert view @property (nullable, weak, nonatomic) MVMCoreUITopAlertView *topAlertView; diff --git a/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m b/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m index af1e5c53..b529ac19 100644 --- a/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m +++ b/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m @@ -23,7 +23,7 @@ #import "MVMCoreUIConstants.h" #import "MVMCoreUICommonViewsUtility.h" #import "MVMCoreUITopAlertView.h" -#import "MVMCoreUINavigationController.h" +#import @interface MVMCoreUISplitViewController () @@ -50,7 +50,7 @@ typedef NS_OPTIONS(NSInteger, MFExtendedDrawer) { @property (weak, nonatomic, readwrite) UIViewController *leftPanel; @property (weak, nonatomic, readwrite) UIViewController *rightPanel; -@property (weak, nonatomic, readwrite) MVMCoreUINavigationController *navigationController; +@property (weak, nonatomic, readwrite) NavigationController *navigationController; // A view that covers the detail view when the master is out. @property (weak, nonatomic) IBOutlet UIView *mainViewCoverView; @@ -802,7 +802,7 @@ CGFloat const PanelAnimationDuration = 0.2; } // The main view. - MVMCoreUINavigationController *navigationController = [MVMCoreUINavigationController setupNavigationController]; + NavigationController *navigationController = [NavigationController setupNavigationController]; self.navigationController = navigationController; self.automaticallyAdjustsScrollViewInsets = NO; diff --git a/MVMCoreUI/MVMCoreUI.h b/MVMCoreUI/MVMCoreUI.h index db10107c..795298b3 100644 --- a/MVMCoreUI/MVMCoreUI.h +++ b/MVMCoreUI/MVMCoreUI.h @@ -58,8 +58,6 @@ FOUNDATION_EXPORT const unsigned char MVMCoreUIVersionString[]; #import #pragma mark - Containers -#import - #import #import #import diff --git a/MVMCoreUI/OtherHandlers/MVMCoreUISession.h b/MVMCoreUI/OtherHandlers/MVMCoreUISession.h index 8adb32cd..ca2db26e 100644 --- a/MVMCoreUI/OtherHandlers/MVMCoreUISession.h +++ b/MVMCoreUI/OtherHandlers/MVMCoreUISession.h @@ -11,15 +11,15 @@ @class MVMCoreUITopAlertView; @class MVMCoreUISplitViewController; @class MFViewController; -@class MVMCoreUINavigationController; @class MFLoadingViewController; +@class NavigationController; NS_ASSUME_NONNULL_BEGIN @interface MVMCoreUISession : MVMCoreSessionObject @property (weak, nonatomic, nullable) MVMCoreUITopAlertView *topAlertView; @property (weak, nonatomic, nullable) MVMCoreUISplitViewController *splitViewController; -@property (weak, nonatomic, nullable) MVMCoreUINavigationController *navigationController; +@property (weak, nonatomic, nullable) NavigationController *navigationController; @property (weak, nonatomic, nullable) MFLoadingViewController *loadingViewController; /// Tracks the current page type the user is currently viewing. KVO compliant. diff --git a/MVMCoreUI/Utility/MVMCoreUIUtility.m b/MVMCoreUI/Utility/MVMCoreUIUtility.m index 48a7a6a1..b760eb36 100644 --- a/MVMCoreUI/Utility/MVMCoreUIUtility.m +++ b/MVMCoreUI/Utility/MVMCoreUIUtility.m @@ -9,7 +9,6 @@ #import "MVMCoreUIUtility.h" #import "MVMCoreUIConstants.h" #import "MVMCoreUISession.h" -#import "MVMCoreUINavigationController.h" #import "MVMCoreUISplitViewController.h" @import MVMCore.MVMCoreNavigationHandler; @import MVMCore.MVMCoreGetterUtility;