diff --git a/MVMCoreUI.xcodeproj/project.pbxproj b/MVMCoreUI.xcodeproj/project.pbxproj index 20c02ce4..45361e01 100644 --- a/MVMCoreUI.xcodeproj/project.pbxproj +++ b/MVMCoreUI.xcodeproj/project.pbxproj @@ -11,21 +11,21 @@ D29DF0E221E4F3B6003B2FB9 /* LargeHeaderSingleLabelViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF0E021E4F3B6003B2FB9 /* LargeHeaderSingleLabelViewController.h */; }; D29DF0E321E4F3B6003B2FB9 /* LargeHeaderSingleLabelViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF0E121E4F3B6003B2FB9 /* LargeHeaderSingleLabelViewController.m */; }; D29DF0E621E4F3C7003B2FB9 /* MVMCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D29DF0E521E4F3C7003B2FB9 /* MVMCore.framework */; }; - D29DF11521E6805F003B2FB9 /* UIColor+MVMCoreUIConvenience.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF11121E6805F003B2FB9 /* UIColor+MVMCoreUIConvenience.h */; }; - D29DF11621E6805F003B2FB9 /* NSLayoutConstraint+MVMCoreUIConvenience.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF11221E6805F003B2FB9 /* NSLayoutConstraint+MVMCoreUIConvenience.h */; }; - D29DF11721E6805F003B2FB9 /* UIColor+MVMCoreUIConvenience.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF11321E6805F003B2FB9 /* UIColor+MVMCoreUIConvenience.m */; }; - D29DF11821E6805F003B2FB9 /* NSLayoutConstraint+MVMCoreUIConvenience.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF11421E6805F003B2FB9 /* NSLayoutConstraint+MVMCoreUIConvenience.m */; }; + D29DF11521E6805F003B2FB9 /* UIColor+MFConvenience.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF11121E6805F003B2FB9 /* UIColor+MFConvenience.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D29DF11621E6805F003B2FB9 /* NSLayoutConstraint+MFConvenience.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF11221E6805F003B2FB9 /* NSLayoutConstraint+MFConvenience.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D29DF11721E6805F003B2FB9 /* UIColor+MFConvenience.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF11321E6805F003B2FB9 /* UIColor+MFConvenience.m */; }; + D29DF11821E6805F003B2FB9 /* NSLayoutConstraint+MFConvenience.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF11421E6805F003B2FB9 /* NSLayoutConstraint+MFConvenience.m */; }; D29DF11C21E684A9003B2FB9 /* MVMCoreUISplitViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF11A21E684A9003B2FB9 /* MVMCoreUISplitViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF11D21E684A9003B2FB9 /* MVMCoreUISplitViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF11B21E684A9003B2FB9 /* MVMCoreUISplitViewController.m */; }; - D29DF12921E6851E003B2FB9 /* MVMCoreUITopAlertMainView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF11F21E6851E003B2FB9 /* MVMCoreUITopAlertMainView.h */; }; + D29DF12921E6851E003B2FB9 /* MVMCoreUITopAlertMainView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF11F21E6851E003B2FB9 /* MVMCoreUITopAlertMainView.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF12A21E6851E003B2FB9 /* MVMCoreUITopAlertView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF12021E6851E003B2FB9 /* MVMCoreUITopAlertView.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF12B21E6851E003B2FB9 /* MVMCoreUITopAlertExpandableView.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF12121E6851E003B2FB9 /* MVMCoreUITopAlertExpandableView.m */; }; - D29DF12C21E6851E003B2FB9 /* MVMCoreUITopAlertShortView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF12221E6851E003B2FB9 /* MVMCoreUITopAlertShortView.h */; }; - D29DF12D21E6851E003B2FB9 /* MVMCoreUITopAlertBaseView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF12321E6851E003B2FB9 /* MVMCoreUITopAlertBaseView.h */; }; + D29DF12C21E6851E003B2FB9 /* MVMCoreUITopAlertShortView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF12221E6851E003B2FB9 /* MVMCoreUITopAlertShortView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D29DF12D21E6851E003B2FB9 /* MVMCoreUITopAlertBaseView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF12321E6851E003B2FB9 /* MVMCoreUITopAlertBaseView.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF12E21E6851E003B2FB9 /* MVMCoreUITopAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF12421E6851E003B2FB9 /* MVMCoreUITopAlertView.m */; }; D29DF12F21E6851E003B2FB9 /* MVMCoreUITopAlertMainView.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF12521E6851E003B2FB9 /* MVMCoreUITopAlertMainView.m */; }; D29DF13021E6851E003B2FB9 /* MVMCoreUITopAlertShortView.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF12621E6851E003B2FB9 /* MVMCoreUITopAlertShortView.m */; }; - D29DF13121E6851E003B2FB9 /* MVMCoreUITopAlertExpandableView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF12721E6851E003B2FB9 /* MVMCoreUITopAlertExpandableView.h */; }; + D29DF13121E6851E003B2FB9 /* MVMCoreUITopAlertExpandableView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF12721E6851E003B2FB9 /* MVMCoreUITopAlertExpandableView.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF13221E6851E003B2FB9 /* MVMCoreUITopAlertBaseView.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF12821E6851E003B2FB9 /* MVMCoreUITopAlertBaseView.m */; }; D29DF15421E69760003B2FB9 /* MVMCoreUIPanelButtonProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF15321E69760003B2FB9 /* MVMCoreUIPanelButtonProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF16121E69996003B2FB9 /* MFViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF15F21E69996003B2FB9 /* MFViewController.m */; }; @@ -55,7 +55,7 @@ D29DF25621E6A177003B2FB9 /* MFTextFieldSubclassExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF24B21E6A177003B2FB9 /* MFTextFieldSubclassExtension.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF25721E6A177003B2FB9 /* MFTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF24C21E6A177003B2FB9 /* MFTextField.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF25921E6A22D003B2FB9 /* MFButtonProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF25821E6A22D003B2FB9 /* MFButtonProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D29DF25C21E6A2B6003B2FB9 /* DashLine.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF25A21E6A2B6003B2FB9 /* DashLine.h */; }; + D29DF25C21E6A2B6003B2FB9 /* DashLine.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF25A21E6A2B6003B2FB9 /* DashLine.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF25D21E6A2B6003B2FB9 /* DashLine.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF25B21E6A2B6003B2FB9 /* DashLine.m */; }; D29DF26021E6A985003B2FB9 /* MFLoadImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF25E21E6A985003B2FB9 /* MFLoadImageView.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF26121E6A985003B2FB9 /* MFLoadImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF25F21E6A985003B2FB9 /* MFLoadImageView.m */; }; @@ -65,13 +65,13 @@ D29DF26D21E6AA0B003B2FB9 /* FLAnimatedImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF26921E6AA0B003B2FB9 /* FLAnimatedImageView.m */; }; D29DF26E21E6AA0B003B2FB9 /* FLAnimatedImage.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF26A21E6AA0B003B2FB9 /* FLAnimatedImage.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF26F21E6AA0B003B2FB9 /* FLAnimatedImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF26B21E6AA0B003B2FB9 /* FLAnimatedImageView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D29DF27521E79E81003B2FB9 /* MVMCoreUILoggingHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF27321E79E81003B2FB9 /* MVMCoreUILoggingHandler.h */; }; + D29DF27521E79E81003B2FB9 /* MVMCoreUILoggingHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF27321E79E81003B2FB9 /* MVMCoreUILoggingHandler.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF27621E79E81003B2FB9 /* MVMCoreUILoggingHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF27421E79E81003B2FB9 /* MVMCoreUILoggingHandler.m */; }; D29DF27921E7A533003B2FB9 /* MVMCoreUISession.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF27721E7A533003B2FB9 /* MVMCoreUISession.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF27A21E7A533003B2FB9 /* MVMCoreUISession.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF27821E7A533003B2FB9 /* MVMCoreUISession.m */; }; D29DF28021E7AA51003B2FB9 /* MVMCoreUIDetailViewProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF27F21E7AA50003B2FB9 /* MVMCoreUIDetailViewProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF28321E7AB24003B2FB9 /* MVMCoreUICommonViewsUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF28121E7AB23003B2FB9 /* MVMCoreUICommonViewsUtility.m */; }; - D29DF28421E7AB24003B2FB9 /* MVMCoreUICommonViewsUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF28221E7AB24003B2FB9 /* MVMCoreUICommonViewsUtility.h */; }; + D29DF28421E7AB24003B2FB9 /* MVMCoreUICommonViewsUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF28221E7AB24003B2FB9 /* MVMCoreUICommonViewsUtility.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF28921E7AC2B003B2FB9 /* MFLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF28521E7AC2B003B2FB9 /* MFLabel.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF28A21E7AC2B003B2FB9 /* MFLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF28621E7AC2B003B2FB9 /* MFLabel.m */; }; D29DF28B21E7AC2B003B2FB9 /* ViewConstrainingView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF28721E7AC2B003B2FB9 /* ViewConstrainingView.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -86,7 +86,7 @@ D29DF29C21E7ADB9003B2FB9 /* MFProgrammaticTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF29421E7ADB8003B2FB9 /* MFProgrammaticTableViewController.m */; }; D29DF29D21E7AE38003B2FB9 /* MFStyler.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF13821E68636003B2FB9 /* MFStyler.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF29E21E7AE3B003B2FB9 /* MFStyler.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF13921E68637003B2FB9 /* MFStyler.m */; }; - D29DF2A121E7AF4E003B2FB9 /* MVMCoreUIUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF29F21E7AF4E003B2FB9 /* MVMCoreUIUtility.h */; }; + D29DF2A121E7AF4E003B2FB9 /* MVMCoreUIUtility.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF29F21E7AF4E003B2FB9 /* MVMCoreUIUtility.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF2A221E7AF4E003B2FB9 /* MVMCoreUIUtility.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF2A021E7AF4E003B2FB9 /* MVMCoreUIUtility.m */; }; D29DF2A521E7B2A0003B2FB9 /* MFCaretView.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF2A321E7B29F003B2FB9 /* MFCaretView.m */; }; D29DF2A621E7B2A0003B2FB9 /* MFCaretView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF2A421E7B2A0003B2FB9 /* MFCaretView.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -95,7 +95,7 @@ D29DF2AE21E7B3A4003B2FB9 /* MFTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF2AB21E7B3A4003B2FB9 /* MFTextView.m */; }; D29DF2AF21E7B3A4003B2FB9 /* MFTextView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D29DF2AC21E7B3A4003B2FB9 /* MFTextView.xib */; }; D29DF2B021E7B3A4003B2FB9 /* MFTextView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF2AD21E7B3A4003B2FB9 /* MFTextView.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D29DF2B321E7B76D003B2FB9 /* MFLoadingSpinner.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF2B121E7B76C003B2FB9 /* MFLoadingSpinner.h */; }; + D29DF2B321E7B76D003B2FB9 /* MFLoadingSpinner.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF2B121E7B76C003B2FB9 /* MFLoadingSpinner.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF2B421E7B76D003B2FB9 /* MFLoadingSpinner.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF2B221E7B76D003B2FB9 /* MFLoadingSpinner.m */; }; D29DF2BC21E7BEA4003B2FB9 /* TopTabbar.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF2B821E7BEA4003B2FB9 /* TopTabbar.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF2BD21E7BEA4003B2FB9 /* MVMCoreUITabBarPageControlViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF2B921E7BEA4003B2FB9 /* MVMCoreUITabBarPageControlViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -109,10 +109,20 @@ D29DF2C921E7BFC6003B2FB9 /* MFSizeObject.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF14421E68728003B2FB9 /* MFSizeObject.m */; }; D29DF2CA21E7BFC8003B2FB9 /* MFSizeThreshold.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF14621E68728003B2FB9 /* MFSizeThreshold.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF2CB21E7BFCC003B2FB9 /* MFSizeThreshold.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF14721E68728003B2FB9 /* MFSizeThreshold.m */; }; - D29DF2CE21E7C104003B2FB9 /* MFLoadingViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF2CC21E7C104003B2FB9 /* MFLoadingViewController.h */; }; + D29DF2CE21E7C104003B2FB9 /* MFLoadingViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF2CC21E7C104003B2FB9 /* MFLoadingViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29DF2CF21E7C104003B2FB9 /* MFLoadingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF2CD21E7C104003B2FB9 /* MFLoadingViewController.m */; }; D29DF2D121E7C1C8003B2FB9 /* MVMAnimationFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D29DF2D021E7C1C8003B2FB9 /* MVMAnimationFramework.framework */; }; D29DF2E121E9240B003B2FB9 /* MVMCoreUIPanelProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF2E021E9240B003B2FB9 /* MVMCoreUIPanelProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D29DF2EE21ECEADF003B2FB9 /* MFFonts.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF14D21E693AD003B2FB9 /* MFFonts.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D29DF2EF21ECEAE1003B2FB9 /* MFFonts.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF14C21E693AD003B2FB9 /* MFFonts.m */; }; + D29DF31A21ECECC0003B2FB9 /* NHaasGroteskDSStd-45Lt.otf in Resources */ = {isa = PBXBuildFile; fileRef = D29DF31621ECECC0003B2FB9 /* NHaasGroteskDSStd-45Lt.otf */; }; + D29DF31B21ECECC0003B2FB9 /* OCRAExtended.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D29DF31721ECECC0003B2FB9 /* OCRAExtended.ttf */; }; + D29DF31C21ECECC0003B2FB9 /* NHaasGroteskDSStd-75Bd.otf in Resources */ = {isa = PBXBuildFile; fileRef = D29DF31821ECECC0003B2FB9 /* NHaasGroteskDSStd-75Bd.otf */; }; + D29DF31D21ECECC0003B2FB9 /* NHaasGroteskDSStd-55Rg.otf in Resources */ = {isa = PBXBuildFile; fileRef = D29DF31921ECECC0003B2FB9 /* NHaasGroteskDSStd-55Rg.otf */; }; + D29DF32021ED0CBA003B2FB9 /* LabelView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF31E21ED0CBA003B2FB9 /* LabelView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D29DF32121ED0CBA003B2FB9 /* LabelView.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF31F21ED0CBA003B2FB9 /* LabelView.m */; }; + D29DF32421ED0DA2003B2FB9 /* TextButtonView.m in Sources */ = {isa = PBXBuildFile; fileRef = D29DF32221ED0DA2003B2FB9 /* TextButtonView.m */; }; + D29DF32521ED0DA2003B2FB9 /* TextButtonView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF32321ED0DA2003B2FB9 /* TextButtonView.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -122,10 +132,10 @@ D29DF0E021E4F3B6003B2FB9 /* LargeHeaderSingleLabelViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LargeHeaderSingleLabelViewController.h; sourceTree = ""; }; D29DF0E121E4F3B6003B2FB9 /* LargeHeaderSingleLabelViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LargeHeaderSingleLabelViewController.m; sourceTree = ""; }; D29DF0E521E4F3C7003B2FB9 /* MVMCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = MVMCore.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D29DF11121E6805F003B2FB9 /* UIColor+MVMCoreUIConvenience.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+MVMCoreUIConvenience.h"; sourceTree = ""; }; - D29DF11221E6805F003B2FB9 /* NSLayoutConstraint+MVMCoreUIConvenience.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSLayoutConstraint+MVMCoreUIConvenience.h"; sourceTree = ""; }; - D29DF11321E6805F003B2FB9 /* UIColor+MVMCoreUIConvenience.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+MVMCoreUIConvenience.m"; sourceTree = ""; }; - D29DF11421E6805F003B2FB9 /* NSLayoutConstraint+MVMCoreUIConvenience.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSLayoutConstraint+MVMCoreUIConvenience.m"; sourceTree = ""; }; + D29DF11121E6805F003B2FB9 /* UIColor+MFConvenience.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIColor+MFConvenience.h"; sourceTree = ""; }; + D29DF11221E6805F003B2FB9 /* NSLayoutConstraint+MFConvenience.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSLayoutConstraint+MFConvenience.h"; sourceTree = ""; }; + D29DF11321E6805F003B2FB9 /* UIColor+MFConvenience.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIColor+MFConvenience.m"; sourceTree = ""; }; + D29DF11421E6805F003B2FB9 /* NSLayoutConstraint+MFConvenience.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSLayoutConstraint+MFConvenience.m"; sourceTree = ""; }; D29DF11A21E684A9003B2FB9 /* MVMCoreUISplitViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MVMCoreUISplitViewController.h; sourceTree = ""; }; D29DF11B21E684A9003B2FB9 /* MVMCoreUISplitViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MVMCoreUISplitViewController.m; sourceTree = ""; }; D29DF11F21E6851E003B2FB9 /* MVMCoreUITopAlertMainView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MVMCoreUITopAlertMainView.h; sourceTree = ""; }; @@ -149,8 +159,8 @@ D29DF15321E69760003B2FB9 /* MVMCoreUIPanelButtonProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MVMCoreUIPanelButtonProtocol.h; sourceTree = ""; }; D29DF15921E697DA003B2FB9 /* SeparatorView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SeparatorView.h; sourceTree = ""; }; D29DF15A21E697DA003B2FB9 /* SeparatorView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SeparatorView.m; sourceTree = ""; }; - D29DF15F21E69996003B2FB9 /* MFViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MFViewController.m; path = "../../../mobilefirst_ios/mobilefirst/UIKit Objects/MF View Controller Subclasses/MFViewController.m"; sourceTree = ""; }; - D29DF16021E69996003B2FB9 /* MFViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MFViewController.h; path = "../../../mobilefirst_ios/mobilefirst/UIKit Objects/MF View Controller Subclasses/MFViewController.h"; sourceTree = ""; }; + D29DF15F21E69996003B2FB9 /* MFViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MFViewController.m; sourceTree = ""; }; + D29DF16021E69996003B2FB9 /* MFViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MFViewController.h; sourceTree = ""; }; D29DF16921E69E1F003B2FB9 /* MFCaretButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MFCaretButton.h; sourceTree = ""; }; D29DF16A21E69E1F003B2FB9 /* MFCustomButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MFCustomButton.h; sourceTree = ""; }; D29DF16B21E69E1F003B2FB9 /* ButtonDelegateProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ButtonDelegateProtocol.h; sourceTree = ""; }; @@ -226,6 +236,14 @@ D29DF2CD21E7C104003B2FB9 /* MFLoadingViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MFLoadingViewController.m; sourceTree = ""; }; D29DF2D021E7C1C8003B2FB9 /* MVMAnimationFramework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MVMAnimationFramework.framework; path = ../SharedFrameworks/MVMAnimationFramework.framework; sourceTree = ""; }; D29DF2E021E9240B003B2FB9 /* MVMCoreUIPanelProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MVMCoreUIPanelProtocol.h; sourceTree = ""; }; + D29DF31621ECECC0003B2FB9 /* NHaasGroteskDSStd-45Lt.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NHaasGroteskDSStd-45Lt.otf"; sourceTree = ""; }; + D29DF31721ECECC0003B2FB9 /* OCRAExtended.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = OCRAExtended.ttf; sourceTree = ""; }; + D29DF31821ECECC0003B2FB9 /* NHaasGroteskDSStd-75Bd.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NHaasGroteskDSStd-75Bd.otf"; sourceTree = ""; }; + D29DF31921ECECC0003B2FB9 /* NHaasGroteskDSStd-55Rg.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NHaasGroteskDSStd-55Rg.otf"; sourceTree = ""; }; + D29DF31E21ED0CBA003B2FB9 /* LabelView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LabelView.h; sourceTree = ""; }; + D29DF31F21ED0CBA003B2FB9 /* LabelView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LabelView.m; sourceTree = ""; }; + D29DF32221ED0DA2003B2FB9 /* TextButtonView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TextButtonView.m; sourceTree = ""; }; + D29DF32321ED0DA2003B2FB9 /* TextButtonView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextButtonView.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -261,6 +279,7 @@ D29DF0CE21E404D4003B2FB9 /* MVMCoreUI */ = { isa = PBXGroup; children = ( + D29DF31421ECECA7003B2FB9 /* SupportingFiles */, D29DF26621E6A9E4003B2FB9 /* ThirdParty */, D29DF27021E79B2C003B2FB9 /* OtherHandlers */, D29DF14E21E693BB003B2FB9 /* Session */, @@ -336,10 +355,10 @@ D29DF11021E6805F003B2FB9 /* Categories */ = { isa = PBXGroup; children = ( - D29DF11121E6805F003B2FB9 /* UIColor+MVMCoreUIConvenience.h */, - D29DF11321E6805F003B2FB9 /* UIColor+MVMCoreUIConvenience.m */, - D29DF11221E6805F003B2FB9 /* NSLayoutConstraint+MVMCoreUIConvenience.h */, - D29DF11421E6805F003B2FB9 /* NSLayoutConstraint+MVMCoreUIConvenience.m */, + D29DF11121E6805F003B2FB9 /* UIColor+MFConvenience.h */, + D29DF11321E6805F003B2FB9 /* UIColor+MFConvenience.m */, + D29DF11221E6805F003B2FB9 /* NSLayoutConstraint+MFConvenience.h */, + D29DF11421E6805F003B2FB9 /* NSLayoutConstraint+MFConvenience.m */, ); path = Categories; sourceTree = ""; @@ -439,6 +458,8 @@ D29DF17F21E69E2E003B2FB9 /* MFView.m */, D29DF28521E7AC2B003B2FB9 /* MFLabel.h */, D29DF28621E7AC2B003B2FB9 /* MFLabel.m */, + D29DF31E21ED0CBA003B2FB9 /* LabelView.h */, + D29DF31F21ED0CBA003B2FB9 /* LabelView.m */, D29DF28721E7AC2B003B2FB9 /* ViewConstrainingView.h */, D29DF28821E7AC2B003B2FB9 /* ViewConstrainingView.m */, D29DF26221E6A9D9003B2FB9 /* MFTransparentGIFView.h */, @@ -456,6 +477,8 @@ D29DF2A321E7B29F003B2FB9 /* MFCaretView.m */, D29DF2B121E7B76C003B2FB9 /* MFLoadingSpinner.h */, D29DF2B221E7B76D003B2FB9 /* MFLoadingSpinner.m */, + D29DF32321ED0DA2003B2FB9 /* TextButtonView.h */, + D29DF32221ED0DA2003B2FB9 /* TextButtonView.m */, ); path = Views; sourceTree = ""; @@ -533,6 +556,25 @@ path = TabBarController; sourceTree = ""; }; + D29DF31421ECECA7003B2FB9 /* SupportingFiles */ = { + isa = PBXGroup; + children = ( + D29DF31521ECECC0003B2FB9 /* Fonts */, + ); + path = SupportingFiles; + sourceTree = ""; + }; + D29DF31521ECECC0003B2FB9 /* Fonts */ = { + isa = PBXGroup; + children = ( + D29DF31621ECECC0003B2FB9 /* NHaasGroteskDSStd-45Lt.otf */, + D29DF31721ECECC0003B2FB9 /* OCRAExtended.ttf */, + D29DF31821ECECC0003B2FB9 /* NHaasGroteskDSStd-75Bd.otf */, + D29DF31921ECECC0003B2FB9 /* NHaasGroteskDSStd-55Rg.otf */, + ); + path = Fonts; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -555,7 +597,7 @@ D29DF0D121E404D4003B2FB9 /* MVMCoreUI.h in Headers */, D29DF29A21E7ADB8003B2FB9 /* MFProgrammaticTableViewController.h in Headers */, D29DF25621E6A177003B2FB9 /* MFTextFieldSubclassExtension.h in Headers */, - D29DF11521E6805F003B2FB9 /* UIColor+MVMCoreUIConvenience.h in Headers */, + D29DF11521E6805F003B2FB9 /* UIColor+MFConvenience.h in Headers */, D29DF2BC21E7BEA4003B2FB9 /* TopTabbar.h in Headers */, D29DF25921E6A22D003B2FB9 /* MFButtonProtocol.h in Headers */, D29DF28421E7AB24003B2FB9 /* MVMCoreUICommonViewsUtility.h in Headers */, @@ -566,6 +608,7 @@ D29DF2B321E7B76D003B2FB9 /* MFLoadingSpinner.h in Headers */, D29DF28921E7AC2B003B2FB9 /* MFLabel.h in Headers */, D29DF0E221E4F3B6003B2FB9 /* LargeHeaderSingleLabelViewController.h in Headers */, + D29DF32521ED0DA2003B2FB9 /* TextButtonView.h in Headers */, D29DF25021E6A177003B2FB9 /* MFDigitTextBox.h in Headers */, D29DF2C621E7BF57003B2FB9 /* MFTabBarInteractor.h in Headers */, D29DF25721E6A177003B2FB9 /* MFTextField.h in Headers */, @@ -574,7 +617,7 @@ D29DF26E21E6AA0B003B2FB9 /* FLAnimatedImage.h in Headers */, D29DF17321E69E1F003B2FB9 /* MFCaretButton.h in Headers */, D29DF2A621E7B2A0003B2FB9 /* MFCaretView.h in Headers */, - D29DF11621E6805F003B2FB9 /* NSLayoutConstraint+MVMCoreUIConvenience.h in Headers */, + D29DF11621E6805F003B2FB9 /* NSLayoutConstraint+MFConvenience.h in Headers */, D29DF17721E69E1F003B2FB9 /* MFTextButton.h in Headers */, D29DF16221E69996003B2FB9 /* MFViewController.h in Headers */, D29DF13121E6851E003B2FB9 /* MVMCoreUITopAlertExpandableView.h in Headers */, @@ -582,6 +625,7 @@ D29DF2CA21E7BFC8003B2FB9 /* MFSizeThreshold.h in Headers */, D29DF28021E7AA51003B2FB9 /* MVMCoreUIDetailViewProtocol.h in Headers */, D29DF2BD21E7BEA4003B2FB9 /* MVMCoreUITabBarPageControlViewController.h in Headers */, + D29DF2EE21ECEADF003B2FB9 /* MFFonts.h in Headers */, D29DF12D21E6851E003B2FB9 /* MVMCoreUITopAlertBaseView.h in Headers */, D29DF24E21E6A177003B2FB9 /* MFDigitTextField.h in Headers */, D29DF17421E69E1F003B2FB9 /* MFCustomButton.h in Headers */, @@ -591,6 +635,7 @@ D29DF2A121E7AF4E003B2FB9 /* MVMCoreUIUtility.h in Headers */, D29DF17621E69E1F003B2FB9 /* PrimaryButton.h in Headers */, D29DF2C821E7BFC1003B2FB9 /* MFSizeObject.h in Headers */, + D29DF32021ED0CBA003B2FB9 /* LabelView.h in Headers */, D29DF2E121E9240B003B2FB9 /* MVMCoreUIPanelProtocol.h in Headers */, D29DF12921E6851E003B2FB9 /* MVMCoreUITopAlertMainView.h in Headers */, D29DF12C21E6851E003B2FB9 /* MVMCoreUITopAlertShortView.h in Headers */, @@ -657,7 +702,11 @@ files = ( D29DF25521E6A177003B2FB9 /* MFDigitTextField.xib in Resources */, D29DF2AF21E7B3A4003B2FB9 /* MFTextView.xib in Resources */, + D29DF31C21ECECC0003B2FB9 /* NHaasGroteskDSStd-75Bd.otf in Resources */, D29DF24F21E6A177003B2FB9 /* MFTextField.xib in Resources */, + D29DF31D21ECECC0003B2FB9 /* NHaasGroteskDSStd-55Rg.otf in Resources */, + D29DF31A21ECECC0003B2FB9 /* NHaasGroteskDSStd-45Lt.otf in Resources */, + D29DF31B21ECECC0003B2FB9 /* OCRAExtended.ttf in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -668,8 +717,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + D29DF32121ED0CBA003B2FB9 /* LabelView.m in Sources */, D29DF29621E7ADB8003B2FB9 /* StackableViewController.m in Sources */, - D29DF11721E6805F003B2FB9 /* UIColor+MVMCoreUIConvenience.m in Sources */, + D29DF11721E6805F003B2FB9 /* UIColor+MFConvenience.m in Sources */, D29DF25321E6A177003B2FB9 /* MFDigitTextField.m in Sources */, D29DF12F21E6851E003B2FB9 /* MVMCoreUITopAlertMainView.m in Sources */, D29DF17C21E69E1F003B2FB9 /* MFTextButton.m in Sources */, @@ -685,6 +735,7 @@ D29DF26521E6A9D9003B2FB9 /* MFTransparentGIFView.m in Sources */, D29DF13021E6851E003B2FB9 /* MVMCoreUITopAlertShortView.m in Sources */, D29DF26D21E6AA0B003B2FB9 /* FLAnimatedImageView.m in Sources */, + D29DF2EF21ECEAE1003B2FB9 /* MFFonts.m in Sources */, D29DF2AE21E7B3A4003B2FB9 /* MFTextView.m in Sources */, D29DF18121E69E50003B2FB9 /* MFView.m in Sources */, D29DF18321E69E54003B2FB9 /* SeparatorView.m in Sources */, @@ -706,13 +757,14 @@ D29DF29821E7ADB8003B2FB9 /* MFScrollingViewController.m in Sources */, D29DF2AA21E7B2F9003B2FB9 /* MVMCoreUIConstants.m in Sources */, D29DF17821E69E1F003B2FB9 /* MFCaretButton.m in Sources */, - D29DF11821E6805F003B2FB9 /* NSLayoutConstraint+MVMCoreUIConvenience.m in Sources */, + D29DF11821E6805F003B2FB9 /* NSLayoutConstraint+MFConvenience.m in Sources */, D29DF26C21E6AA0B003B2FB9 /* FLAnimatedImage.m in Sources */, D29DF25121E6A177003B2FB9 /* MFDigitTextBox.m in Sources */, D29DF13221E6851E003B2FB9 /* MVMCoreUITopAlertBaseView.m in Sources */, D29DF0E321E4F3B6003B2FB9 /* LargeHeaderSingleLabelViewController.m in Sources */, D29DF29C21E7ADB9003B2FB9 /* MFProgrammaticTableViewController.m in Sources */, D29DF2BE21E7BEA4003B2FB9 /* TopTabbar.m in Sources */, + D29DF32421ED0DA2003B2FB9 /* TextButtonView.m in Sources */, D29DF29E21E7AE3B003B2FB9 /* MFStyler.m in Sources */, D29DF2CB21E7BFCC003B2FB9 /* MFSizeThreshold.m in Sources */, ); diff --git a/MVMCoreUI/Atoms/Buttons/MFCaretButton.h b/MVMCoreUI/Atoms/Buttons/MFCaretButton.h index 602f3341..64bd8a0f 100644 --- a/MVMCoreUI/Atoms/Buttons/MFCaretButton.h +++ b/MVMCoreUI/Atoms/Buttons/MFCaretButton.h @@ -7,7 +7,7 @@ // #import -#import "MFCustomButton.h" +#import @interface MFCaretButton : MFCustomButton @property (nullable, nonatomic, strong) UIView *rightView; diff --git a/MVMCoreUI/Atoms/Buttons/MFCaretButton.m b/MVMCoreUI/Atoms/Buttons/MFCaretButton.m index 40886f39..bd8f058c 100644 --- a/MVMCoreUI/Atoms/Buttons/MFCaretButton.m +++ b/MVMCoreUI/Atoms/Buttons/MFCaretButton.m @@ -8,7 +8,7 @@ #import "MFCaretButton.h" #import "MFCaretView.h" -#import "UIColor+MVMCoreUIConvenience.h" +#import "UIColor+MFConvenience.h" @interface MFCaretButton () diff --git a/MVMCoreUI/Atoms/Buttons/MFCustomButton.h b/MVMCoreUI/Atoms/Buttons/MFCustomButton.h index 22afed15..52a462e9 100644 --- a/MVMCoreUI/Atoms/Buttons/MFCustomButton.h +++ b/MVMCoreUI/Atoms/Buttons/MFCustomButton.h @@ -8,8 +8,8 @@ #import #import -#import "ButtonDelegateProtocol.h" -#import "MFButtonProtocol.h" +#import +#import typedef void (^ButtonTapBlock)(id _Nonnull sender); diff --git a/MVMCoreUI/Atoms/Buttons/MFTextButton.h b/MVMCoreUI/Atoms/Buttons/MFTextButton.h index d5fcd8e7..ef24ea2d 100644 --- a/MVMCoreUI/Atoms/Buttons/MFTextButton.h +++ b/MVMCoreUI/Atoms/Buttons/MFTextButton.h @@ -7,7 +7,7 @@ // #import "MFCustomButton.h" -#import "MFView.h" +#import @class MFSizeObject; @interface MFTextButton : MFCustomButton diff --git a/MVMCoreUI/Atoms/Buttons/MFTextButton.m b/MVMCoreUI/Atoms/Buttons/MFTextButton.m index cf2e0fb5..8dc2ae46 100644 --- a/MVMCoreUI/Atoms/Buttons/MFTextButton.m +++ b/MVMCoreUI/Atoms/Buttons/MFTextButton.m @@ -8,8 +8,8 @@ #import "MFTextButton.h" #import "MFStyler.h" -#import "MFSizeObject.h" -#import "UIColor+MVMCoreUIConvenience.h" +#import +#import "UIColor+MFConvenience.h" #import "MVMCoreUISplitViewController.h" #import #import diff --git a/MVMCoreUI/Atoms/Buttons/PrimaryButton.h b/MVMCoreUI/Atoms/Buttons/PrimaryButton.h index 80d8c33c..b451a196 100644 --- a/MVMCoreUI/Atoms/Buttons/PrimaryButton.h +++ b/MVMCoreUI/Atoms/Buttons/PrimaryButton.h @@ -7,9 +7,9 @@ // #import -#import "MFCustomButton.h" -#import "MFTextField.h" -#import "MFView.h" +#import +#import +#import typedef enum : NSUInteger { PrimaryButtonTypeRed, diff --git a/MVMCoreUI/Atoms/Buttons/PrimaryButton.m b/MVMCoreUI/Atoms/Buttons/PrimaryButton.m index 4371ae76..cffd5f8b 100644 --- a/MVMCoreUI/Atoms/Buttons/PrimaryButton.m +++ b/MVMCoreUI/Atoms/Buttons/PrimaryButton.m @@ -7,12 +7,12 @@ // #import "PrimaryButton.h" -#import "MFSizeObject.h" +#import #import #import #import "MVMCoreUISplitViewController.h" #import "MFStyler.h" -#import "UIColor+MVMCoreUIConvenience.h" +#import "UIColor+MFConvenience.h" @interface PrimaryButton () diff --git a/MVMCoreUI/Atoms/TextFields/MFDigitTextBox.m b/MVMCoreUI/Atoms/TextFields/MFDigitTextBox.m index e3145b4e..49abe4cd 100644 --- a/MVMCoreUI/Atoms/TextFields/MFDigitTextBox.m +++ b/MVMCoreUI/Atoms/TextFields/MFDigitTextBox.m @@ -9,8 +9,8 @@ #import "MFDigitTextBox.h" #import "MFStyler.h" #import "MFFonts.h" -#import "UIColor+MVMCoreUIConvenience.h" -#import "MFSizeObject.h" +#import "UIColor+MFConvenience.h" +#import #import "MVMCoreUISplitViewController.h" #import #import diff --git a/MVMCoreUI/Atoms/TextFields/MFDigitTextField.m b/MVMCoreUI/Atoms/TextFields/MFDigitTextField.m index 463f8171..26b28f08 100644 --- a/MVMCoreUI/Atoms/TextFields/MFDigitTextField.m +++ b/MVMCoreUI/Atoms/TextFields/MFDigitTextField.m @@ -7,14 +7,14 @@ // #import "MFDigitTextField.h" -#import "UIColor+MVMCoreUIConvenience.h" +#import "UIColor+MFConvenience.h" #import "MFTextFieldSubclassExtension.h" #import "MVMCoreUICommonViewsUtility.h" #import "MFStyler.h" #import "StackableViewController.h" #import "MFFonts.h" #import "MFDigitTextBox.h" -#import "MFSizeObject.h" +#import #import "MVMCoreUISplitViewController.h" #import #import "MVMCoreUIUtility.h" diff --git a/MVMCoreUI/Atoms/TextFields/MFMdnTextField.h b/MVMCoreUI/Atoms/TextFields/MFMdnTextField.h index 1a2fb34d..1400a0b6 100644 --- a/MVMCoreUI/Atoms/TextFields/MFMdnTextField.h +++ b/MVMCoreUI/Atoms/TextFields/MFMdnTextField.h @@ -9,7 +9,7 @@ #import #import #import -#import "MFTextField.h" +#import @interface MFMdnTextField : MFTextField diff --git a/MVMCoreUI/Atoms/TextFields/MFMdnTextField.m b/MVMCoreUI/Atoms/TextFields/MFMdnTextField.m index 766d5962..84e0869e 100644 --- a/MVMCoreUI/Atoms/TextFields/MFMdnTextField.m +++ b/MVMCoreUI/Atoms/TextFields/MFMdnTextField.m @@ -10,7 +10,7 @@ #import #import "MVMCoreUICommonViewsUtility.h" #import -#import "UIColor+MVMCoreUIConvenience.h" +#import "UIColor+MFConvenience.h" #import "MVMCoreUIUtility.h" #import "MVMCoreUIConstants.h" diff --git a/MVMCoreUI/Atoms/TextFields/MFTextField.h b/MVMCoreUI/Atoms/TextFields/MFTextField.h index 54efff52..e3e12a04 100644 --- a/MVMCoreUI/Atoms/TextFields/MFTextField.h +++ b/MVMCoreUI/Atoms/TextFields/MFTextField.h @@ -7,7 +7,7 @@ // #import -#import "MFView.h" +#import @class PrimaryButton; @class MFTextField; diff --git a/MVMCoreUI/Atoms/TextFields/MFTextField.m b/MVMCoreUI/Atoms/TextFields/MFTextField.m index 27407fbe..2e41a4ca 100644 --- a/MVMCoreUI/Atoms/TextFields/MFTextField.m +++ b/MVMCoreUI/Atoms/TextFields/MFTextField.m @@ -11,7 +11,7 @@ #import "MFTextFieldSubclassExtension.h" #import #import "MFStyler.h" -#import "UIColor+MVMCoreUIConvenience.h" +#import "UIColor+MFConvenience.h" #import #import "MVMCoreUICommonViewsUtility.h" #import diff --git a/MVMCoreUI/Atoms/TextFields/MFTextFieldSubclassExtension.h b/MVMCoreUI/Atoms/TextFields/MFTextFieldSubclassExtension.h index f1eb18d1..869c11ca 100644 --- a/MVMCoreUI/Atoms/TextFields/MFTextFieldSubclassExtension.h +++ b/MVMCoreUI/Atoms/TextFields/MFTextFieldSubclassExtension.h @@ -6,7 +6,7 @@ // Copyright © 2016 Verizon Wireless. All rights reserved. // -#import "MFTextField.h" +#import @class DashLine; diff --git a/MVMCoreUI/Atoms/Views/DashLine.m b/MVMCoreUI/Atoms/Views/DashLine.m index 1290cce1..0837daa3 100644 --- a/MVMCoreUI/Atoms/Views/DashLine.m +++ b/MVMCoreUI/Atoms/Views/DashLine.m @@ -7,7 +7,7 @@ // #import "DashLine.h" -#import "UIColor+MVMCoreUIConvenience.h" +#import "UIColor+MFConvenience.h" #import @implementation DashLine diff --git a/MVMCoreUI/Atoms/Views/LabelView.h b/MVMCoreUI/Atoms/Views/LabelView.h new file mode 100644 index 00000000..6e20d0b6 --- /dev/null +++ b/MVMCoreUI/Atoms/Views/LabelView.h @@ -0,0 +1,23 @@ +// +// LabelView.h +// myverizon +// +// Created by Scott Pfeil on 12/11/15. +// Copyright © 2015 Verizon Wireless. All rights reserved. +// + +#import +#import +#import + +@interface LabelView : ViewConstrainingView + +// Customize the label. +@property (nullable, weak, nonatomic) MFLabel *label; + +// Change the alignment of the label +- (void)alignLeft; +- (void)alignCenter; +- (void)alignRight; + +@end diff --git a/MVMCoreUI/Atoms/Views/LabelView.m b/MVMCoreUI/Atoms/Views/LabelView.m new file mode 100644 index 00000000..6136e897 --- /dev/null +++ b/MVMCoreUI/Atoms/Views/LabelView.m @@ -0,0 +1,117 @@ +// +// LabelView.m +// myverizon +// +// Created by Scott Pfeil on 12/11/15. +// Copyright © 2015 Verizon Wireless. All rights reserved. +// + +#import +#import "MFStyler.h" +@interface LabelView () + +// Change to customize. +@property (strong, nonatomic) NSLayoutConstraint *alignCenterPin; +@property (strong, nonatomic) NSLayoutConstraint *alignCenterLeftPin; +@property (strong, nonatomic) NSLayoutConstraint *alignCenterRightPin; + +// Sets up the view. +- (void)setupView; + +@end + +@implementation LabelView + +- (void)updateView:(CGFloat)size { + [super updateView:size]; + [self.label updateView:size]; +} + +- (void)setupView { + + if (!self.label) { + self.backgroundColor = [UIColor clearColor]; + + MFLabel *label = [MFLabel commonLabelB2:YES]; + [self addSubview:label]; + self.label = label; + + // Align left and right constants. + NSLayoutConstraint *leftPin = [NSLayoutConstraint constraintWithItem:label attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0]; + self.leftPin = leftPin; + leftPin.active = YES; + + NSLayoutConstraint *topPin = [NSLayoutConstraint constraintWithItem:label attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeTop multiplier:1.0 constant:0]; + topPin.priority = 999; + self.topPin = topPin; + topPin.active = YES; + + NSLayoutConstraint *bottomPin = [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:label attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0]; + self.bottomPin = bottomPin; + bottomPin.active = YES; + + NSLayoutConstraint *rightPin = [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:label attribute:NSLayoutAttributeRight multiplier:1.0 constant:0]; + rightPin.priority = 999; + self.rightPin = rightPin; + rightPin.active = YES; + + // Center alignments + NSLayoutConstraint *alignCenter = [NSLayoutConstraint constraintWithItem:label attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:0]; + self.alignCenterPin = alignCenter; + alignCenter.active = YES; + + NSLayoutConstraint *centerLeftPin = [NSLayoutConstraint constraintWithItem:label attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationGreaterThanOrEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0]; + self.alignCenterLeftPin = centerLeftPin; + centerLeftPin.active = YES; + + NSLayoutConstraint *centerRightPin = [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationGreaterThanOrEqual toItem:label attribute:NSLayoutAttributeRight multiplier:1.0 constant:0]; + self.alignCenterRightPin = centerRightPin; + centerRightPin.active = YES; + + [self alignLeft]; + } +} + +- (void)alignLeft { + self.alignCenterPin.active = NO; + self.alignCenterLeftPin.active = NO; + self.alignCenterRightPin.active = NO; + self.leftPin.active = YES; + self.rightPin.active = YES; + self.label.textAlignment = NSTextAlignmentLeft; +} + +- (void)alignCenter { + self.alignCenterPin.active = YES; + self.alignCenterLeftPin.active = YES; + self.alignCenterRightPin.active = YES; + self.leftPin.active = NO; + self.rightPin.active = NO; + self.label.textAlignment = NSTextAlignmentCenter; +} + +- (void)alignRight { + self.alignCenterPin.active = NO; + self.alignCenterLeftPin.active = NO; + self.alignCenterRightPin.active = NO; + self.leftPin.active = YES; + self.rightPin.active = YES; + self.label.textAlignment = NSTextAlignmentRight; +} + +- (void)setLeftPinConstant:(CGFloat)constant { + [super setLeftPinConstant:constant]; + self.alignCenterLeftPin.constant = constant; +} + +- (void)setRightPinConstant:(CGFloat)constant { + [super setRightPinConstant:constant]; + self.alignCenterRightPin.constant = constant; +} + +- (void)resetConstraints { + [super resetConstraints]; + [self alignLeft]; +} + +@end diff --git a/MVMCoreUI/Atoms/Views/MFCaretView.m b/MVMCoreUI/Atoms/Views/MFCaretView.m index b543a3f0..182f7a74 100644 --- a/MVMCoreUI/Atoms/Views/MFCaretView.m +++ b/MVMCoreUI/Atoms/Views/MFCaretView.m @@ -7,7 +7,7 @@ // #import "MFCaretView.h" -#import "UIColor+MVMCoreUIConvenience.h" +#import "UIColor+MFConvenience.h" @interface MFCaretView () @property (strong, nonatomic, readwrite) UIColor *strokeColor; @property (nonatomic) NSNumber *lineWidth; diff --git a/MVMCoreUI/Atoms/Views/MFLabel.m b/MVMCoreUI/Atoms/Views/MFLabel.m index bbc0bc7e..1b7b0860 100644 --- a/MVMCoreUI/Atoms/Views/MFLabel.m +++ b/MVMCoreUI/Atoms/Views/MFLabel.m @@ -8,8 +8,8 @@ #import "MFLabel.h" #import "MFStyler.h" -#import "MFSizeObject.h" -#import "UIColor+MVMCoreUIConvenience.h" +#import +#import "UIColor+MFConvenience.h" #import "MFFonts.h" #import "MVMCoreUISplitViewController.h" #import diff --git a/MVMCoreUI/Atoms/Views/MFLoadImageView.m b/MVMCoreUI/Atoms/Views/MFLoadImageView.m index 02a73da1..c8397fc9 100644 --- a/MVMCoreUI/Atoms/Views/MFLoadImageView.m +++ b/MVMCoreUI/Atoms/Views/MFLoadImageView.m @@ -12,7 +12,7 @@ #import #import #import -#import "NSLayoutConstraint+MVMCoreUIConvenience.h" +#import "NSLayoutConstraint+MFConvenience.h" #import "MVMCoreUIUtility.h" @interface MFLoadImageView () diff --git a/MVMCoreUI/Atoms/Views/MFLoadingSpinner.m b/MVMCoreUI/Atoms/Views/MFLoadingSpinner.m index 1a6d2852..7b354dca 100644 --- a/MVMCoreUI/Atoms/Views/MFLoadingSpinner.m +++ b/MVMCoreUI/Atoms/Views/MFLoadingSpinner.m @@ -7,8 +7,8 @@ // #import "MFLoadingSpinner.h" -#import "UIColor+MVMCoreUIConvenience.h" -#import "NSLayoutConstraint+MVMCoreUIConvenience.h" +#import "UIColor+MFConvenience.h" +#import "NSLayoutConstraint+MFConvenience.h" @interface MFLoadingSpinner () diff --git a/MVMCoreUI/Atoms/Views/MFTextView.m b/MVMCoreUI/Atoms/Views/MFTextView.m index b677a2c3..df4206d7 100644 --- a/MVMCoreUI/Atoms/Views/MFTextView.m +++ b/MVMCoreUI/Atoms/Views/MFTextView.m @@ -7,7 +7,7 @@ // #import "MFTextView.h" -#import "UIColor+MVMCoreUIConvenience.h" +#import "UIColor+MFConvenience.h" #import "MVMCoreUIUtility.h" #import #import "MVMCoreUIConstants.h" diff --git a/MVMCoreUI/Atoms/Views/SeparatorView.h b/MVMCoreUI/Atoms/Views/SeparatorView.h index 464ebbb5..78fe65e8 100644 --- a/MVMCoreUI/Atoms/Views/SeparatorView.h +++ b/MVMCoreUI/Atoms/Views/SeparatorView.h @@ -7,7 +7,7 @@ // #import -#import "MFView.h" +#import @class MFSizeObject; typedef enum : NSUInteger { diff --git a/MVMCoreUI/Atoms/Views/SeparatorView.m b/MVMCoreUI/Atoms/Views/SeparatorView.m index bf406164..98e61f33 100644 --- a/MVMCoreUI/Atoms/Views/SeparatorView.m +++ b/MVMCoreUI/Atoms/Views/SeparatorView.m @@ -7,9 +7,9 @@ // #import "SeparatorView.h" -#import "MFSizeObject.h" +#import #import "MVMCoreUICommonViewsUtility.h" -#import "UIColor+MVMCoreUIConvenience.h" +#import "UIColor+MFConvenience.h" @interface SeparatorView() diff --git a/MVMCoreUI/Atoms/Views/TextButtonView.h b/MVMCoreUI/Atoms/Views/TextButtonView.h new file mode 100644 index 00000000..0d4a6995 --- /dev/null +++ b/MVMCoreUI/Atoms/Views/TextButtonView.h @@ -0,0 +1,31 @@ +// +// TextButtonView.h +// myverizon +// +// Created by Scott Pfeil on 12/11/15. +// Copyright © 2015 Verizon Wireless. All rights reserved. +// + +#import +#import +#import + +@interface TextButtonView : ViewConstrainingView + +@property (nullable, weak, nonatomic) MFTextButton *textButton; +@property (nullable, weak, nonatomic) MFTextButton *secondaryTextButton; + +// Any standard init creates a single button. + +// inits with two buttons. +- (nullable instancetype)initWithTwoButtons; + +// Change the alignment of the button. Default is left. +- (void)alignLeft; +- (void)alignCenter; +- (void)alignRight; + +// To add dotted underline below text button, in case of one button +- (void)addDotLineBelowButton; + +@end diff --git a/MVMCoreUI/Atoms/Views/TextButtonView.m b/MVMCoreUI/Atoms/Views/TextButtonView.m new file mode 100644 index 00000000..7c9f5e23 --- /dev/null +++ b/MVMCoreUI/Atoms/Views/TextButtonView.m @@ -0,0 +1,196 @@ +// +// TextButtonView.m +// myverizon +// +// Created by Scott Pfeil on 12/11/15. +// Copyright © 2015 Verizon Wireless. All rights reserved. +// + +#import "TextButtonView.h" +#import +#import "MVMCoreUICommonViewsUtility.h" +#import "NSLayoutConstraint+MFConvenience.h" + +#import + +@interface TextButtonView () + +@property (weak, nonatomic) NSLayoutConstraint *alignCenterPin; +@property (weak, nonatomic) NSLayoutConstraint *alignCenterLeftPin; +@property (weak, nonatomic) NSLayoutConstraint *alignCenterRightPin; +@property (strong, nonatomic) UIView *dotLine; + +// Sets up the view. +- (void)setupView; + +@end + +@implementation TextButtonView + +#pragma mark - Dotted line helpers + +- (void)updateDottedLine { + [self layoutIfNeeded]; + CAShapeLayer *dotLineShapeLayer = [CAShapeLayer layer]; + [dotLineShapeLayer setBounds:self.dotLine.bounds]; + [dotLineShapeLayer setPosition:self.dotLine.center]; + [dotLineShapeLayer setFillColor:[[UIColor clearColor] CGColor]]; + [dotLineShapeLayer setStrokeColor:[[UIColor mfTextButtonColor] CGColor]]; + [dotLineShapeLayer setLineWidth:1.0f]; + [dotLineShapeLayer setLineJoin:kCALineJoinRound]; + [dotLineShapeLayer setLineCap:kCALineCapRound]; + [dotLineShapeLayer setLineDashPattern:@[@2,@2]]; + CGMutablePathRef signOutpath = CGPathCreateMutable(); + CGPathMoveToPoint(signOutpath, NULL, -self.dotLine.frame.origin.x, -self.dotLine.frame.origin.y); + CGPathAddLineToPoint(signOutpath, NULL, -self.dotLine.frame.origin.x+self.dotLine.frame.size.width,-self.dotLine.frame.origin.y); + [dotLineShapeLayer setPath:signOutpath]; + CGPathRelease(signOutpath); + self.dotLine.layer.sublayers = nil; + [self.dotLine.layer addSublayer:dotLineShapeLayer]; +} + +- (void)addDotLineBelowButton { + UIView *dotLine = [MVMCoreUICommonViewsUtility commonView]; + [self.textButton addSubview:dotLine]; + self.dotLine = dotLine; + [NSLayoutConstraint constraintPinView:dotLine heightConstraint:YES heightConstant:1 widthConstraint:NO widthConstant:0]; + [NSLayoutConstraint constraintPinSubview:dotLine pinTop:NO pinBottom:YES pinLeft:YES pinRight:YES]; + dotLine.userInteractionEnabled = NO; + [self updateDottedLine]; +} + +#pragma mark- View Cycle + +- (void)updateView:(CGFloat)size { + [super updateView:size]; + [self.textButton updateView:size]; + [self.secondaryTextButton updateView:size]; + [self updateDottedLine]; +} + +- (void)setupView { + + if (!self.textButton) { + self.backgroundColor = [UIColor clearColor]; + self.translatesAutoresizingMaskIntoConstraints = NO; + + MFTextButton *button = [MFTextButton textButton:nil constrainHeight:YES forWidth:CGFLOAT_MIN]; + button.translatesAutoresizingMaskIntoConstraints = NO; + [self addSubview:button]; + self.textButton = button; + + // Align left and right constants. + NSLayoutConstraint *leftPin = [NSLayoutConstraint constraintWithItem:button attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0]; + self.leftPin = leftPin; + leftPin.active = YES; + + NSLayoutConstraint *topPin = [NSLayoutConstraint constraintWithItem:button attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeTop multiplier:1.0 constant:0]; + self.topPin = topPin; + topPin.active = YES; + + NSLayoutConstraint *bottomPin = [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:button attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0]; + self.bottomPin = bottomPin; + bottomPin.active = YES; + + NSLayoutConstraint *rightPin = [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:button attribute:NSLayoutAttributeRight multiplier:1.0 constant:0]; + self.rightPin = rightPin; + rightPin.active = YES; + + // Center alignments + NSLayoutConstraint *alignCenter = [NSLayoutConstraint constraintWithItem:button attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeCenterX multiplier:1.0 constant:0]; + self.alignCenterPin = alignCenter; + alignCenter.active = YES; + + NSLayoutConstraint *centerLeftPin = [NSLayoutConstraint constraintWithItem:button attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationGreaterThanOrEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0]; + self.alignCenterLeftPin = centerLeftPin; + centerLeftPin.active = YES; + + NSLayoutConstraint *centerRightPin = [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationGreaterThanOrEqual toItem:button attribute:NSLayoutAttributeRight multiplier:1.0 constant:0]; + self.alignCenterRightPin = centerRightPin; + centerRightPin.active = YES; + + [self alignLeft]; + } +} + +- (instancetype)initWithTwoButtons { + + if (self = [super init]) { + if (!self.secondaryTextButton) { + + if (self.textButton) { + [self.textButton removeFromSuperview]; + } + + MFTextButton *leftButton = [MFTextButton textButton:nil constrainHeight:YES forWidth:CGFLOAT_MIN]; + leftButton.translatesAutoresizingMaskIntoConstraints = NO; + [self addSubview:leftButton]; + self.textButton = leftButton; + + MFTextButton *rightButton = [MFTextButton textButton:nil constrainHeight:YES forWidth:CGFLOAT_MIN]; + rightButton.translatesAutoresizingMaskIntoConstraints = NO; + [self addSubview:rightButton]; + self.secondaryTextButton = rightButton; + + NSLayoutConstraint *leftPin = [NSLayoutConstraint constraintWithItem:leftButton attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1.0 constant:0]; + self.leftPin = leftPin; + leftPin.active = YES; + + NSLayoutConstraint *topPin = [NSLayoutConstraint constraintWithItem:leftButton attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeTop multiplier:1.0 constant:0]; + self.topPin = topPin; + topPin.active = YES; + + NSLayoutConstraint *bottomPin = [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:leftButton attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0]; + self.bottomPin = bottomPin; + bottomPin.active = YES; + + NSLayoutConstraint *rightPin = [NSLayoutConstraint constraintWithItem:self attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:rightButton attribute:NSLayoutAttributeRight multiplier:1.0 constant:0]; + self.rightPin = rightPin; + rightPin.active = YES; + + [NSLayoutConstraint activateConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:[leftButton]->=10-[rightButton]" options:NSLayoutFormatAlignAllCenterY metrics:nil views:NSDictionaryOfVariableBindings(leftButton,rightButton)]]; + } + } + return self; +} + +- (void)alignLeft { + self.alignCenterPin.active = NO; + self.alignCenterLeftPin.active = NO; + self.alignCenterRightPin.active = YES; + self.leftPin.active = YES; + self.rightPin.active = NO; +} + +- (void)alignCenter { + self.alignCenterPin.active = YES; + self.alignCenterLeftPin.active = YES; + self.alignCenterRightPin.active = YES; + self.leftPin.active = NO; + self.rightPin.active = NO; +} + +- (void)alignRight { + self.alignCenterPin.active = NO; + self.alignCenterLeftPin.active = YES; + self.alignCenterRightPin.active = NO; + self.leftPin.active = NO; + self.rightPin.active = YES; +} + +- (void)setLeftPinConstant:(CGFloat)constant { + [super setLeftPinConstant:constant]; + self.alignCenterLeftPin.constant = constant; +} + +- (void)setRightPinConstant:(CGFloat)constant { + [super setRightPinConstant:constant]; + self.alignCenterRightPin.constant = constant; +} + +- (void)resetConstraints { + [super resetConstraints]; + [self alignLeft]; +} + +@end diff --git a/MVMCoreUI/BaseControllers/MFLoadingViewController.m b/MVMCoreUI/BaseControllers/MFLoadingViewController.m index a54ccc40..c44dd76f 100644 --- a/MVMCoreUI/BaseControllers/MFLoadingViewController.m +++ b/MVMCoreUI/BaseControllers/MFLoadingViewController.m @@ -8,8 +8,8 @@ #import "MFLoadingViewController.h" #import "MFLoadingSpinner.h" -#import "NSLayoutConstraint+MVMCoreUIConvenience.h" -#import "UIColor+MVMCoreUIConvenience.h" +#import "NSLayoutConstraint+MFConvenience.h" +#import "UIColor+MFConvenience.h" #import "MFStyler.h" #import "MVMCoreUICommonViewsUtility.h" diff --git a/MVMCoreUI/BaseControllers/MFProgrammaticTableViewController.m b/MVMCoreUI/BaseControllers/MFProgrammaticTableViewController.m index 1b1b469f..ba7df785 100644 --- a/MVMCoreUI/BaseControllers/MFProgrammaticTableViewController.m +++ b/MVMCoreUI/BaseControllers/MFProgrammaticTableViewController.m @@ -7,7 +7,7 @@ // #import "MFProgrammaticTableViewController.h" -#import "NSLayoutConstraint+MVMCoreUIConvenience.h" +#import "NSLayoutConstraint+MFConvenience.h" #import @import MVMAnimationFramework; diff --git a/MVMCoreUI/BaseControllers/MFScrollingViewController.m b/MVMCoreUI/BaseControllers/MFScrollingViewController.m index e23695a6..5c56998f 100644 --- a/MVMCoreUI/BaseControllers/MFScrollingViewController.m +++ b/MVMCoreUI/BaseControllers/MFScrollingViewController.m @@ -12,7 +12,7 @@ #import #import #import -#import "NSLayoutConstraint+MVMCoreUIConvenience.h" +#import "NSLayoutConstraint+MFConvenience.h" #import #import "MVMCoreUIUtility.h" #import "MVMCoreUIConstants.h" diff --git a/MVMCoreUI/BaseControllers/MFViewController.h b/MVMCoreUI/BaseControllers/MFViewController.h new file mode 100644 index 00000000..b7df0bef --- /dev/null +++ b/MVMCoreUI/BaseControllers/MFViewController.h @@ -0,0 +1,290 @@ +// +// MFViewController.h +// myverizon +// +// Created by Scott Pfeil on 11/26/13. +// Copyright (c) 2013 Verizon Wireless. All rights reserved. +// +// The base view controller. Any view controller that is part of the app flow should be subclassed from this object. + +#import +#import +#import +#import +#import +#import +#import + +#import +#import +#import +#import +#import +#import + +#import +#import + +@class MainMenuViewController; +@class MVMCoreUITabBarPageControlViewController; +@class MVMAnimationManager; + +@interface MFViewController : UIViewController + +// Stores the load object that this screen was loaded with. +@property (nullable, strong, nonatomic) MVMCoreLoadObject *loadObject; + +// The current selected text field. +@property (nullable, weak, nonatomic) __block id selectedField; + +// Flags for if the master and support should be accessible. These are set initially and then checked everytime view will appear to make sure that the support and master buttons are showing if they should be. +// ** When set, they will update the support and master buttons +@property (nonatomic) BOOL masterShouldBeAccessible; +@property (nonatomic) BOOL supportShouldBeAccessible; +@property (nonatomic) BOOL cartShouldBeAccessible; +@property (nonatomic) BOOL communityShouldBeAccessible; +@property (nonatomic) BOOL closeButtonAccessible; + +// A flag for if we need to update the UI or not next time viewDidLayoutSubviews is called. +@property (nonatomic) BOOL needToUpdateUI; + +// flag used to tell if we need to updateViews based on rotation. +@property (nonatomic) BOOL needToupdateUIOnScreenSizeChanges; + + +// A flag for if this viewControler should trigger MFAnimationController's StartAnimations in viewDidAppear +@property (nonatomic) BOOL shouldTriggerStartAnimations; + +// The page type for this screen. +@property (nullable, strong, nonatomic) NSString *pageType; + +// Set if this page is containted in a tab bar page control. +@property (nullable, weak, nonatomic) MVMCoreUITabBarPageControlViewController *tabBarPageControl; + +/* The bottom progress view that is shown in the shop flow */ +@property (nullable, nonatomic, strong) UIProgressView *progressView; + +// a flag that tells the view controller's view will appear not trying to load specaill support icon +@property (assign, nonatomic) BOOL DontChangeSpecialSupportIcon; + +// The size of the previous screen configuration. Updates each rotate. +@property (nonatomic) CGSize previousScreenSize; + +// The current top alert showing page type +@property (nullable, nonatomic, strong) NSString *currentTopAlertPageType; + +#pragma mark - Helpers + +// Dismisses this screen. +- (void)dismiss; + +// Checks if this view controller is the visible one (not necessarily visible to user, but for the app). +- (BOOL)isVisibleViewController; + +// Registers the text field for the error key so that if there is a text field error with this key, the textfield will show the error. +- (void)registerTextField:(nonnull MFTextField *)textField forErrorKey:(nonnull NSString *)errorKey; + +// Returns if the screen size has changed. +- (BOOL)screenSizeChanged; + +#pragma mark - Functions To Subclass + +// This view controller should subclass this function and check the load to make sure it has all the needed data. Fills the error object if there are any errors. Returns if we should finish the load or not. +- (BOOL)shouldFinishProcessingLoad:(nonnull MVMCoreLoadObject *)loadObject error:(MVMCoreErrorObject *_Nonnull *_Nonnull)error; + +// Sets the screen to use the screen heading. +// it is required in device flow, where we are showing greeting name as screen heading, +// device details screen heading needs to be updated/refreshed again, if user has changed device nick name +- (nullable NSString *)screenHeading; + +// properly set the screen heading message +- (void)setScreenHeadingMessage:(nullable NSString *)screenHeadingMessage; + +// There is new data and we need to reset the data for the screen. Refresh all logic based on json dictionary. Can put most view creation logic in here. +- (void)newDataBuildScreen; + +// A function that gets called on only the initial load. Meant for subclassing. +- (void)initialLoad __attribute__((objc_requires_super)); + +// Subclass this function to layout any subviews here. Update constraints based on the screen in here. +- (void)updateViews; + +// Called when the back button is pressed. Overwrite for special functionality. Default is to just popviewcontroller. +- (void)backButtonPressed; + +// Called when the close button is pressed. +- (void)closeButtonPressed; + +// Handles the error. Logs and shows to screen. +- (void)handleErrorAsPopup:(nonnull MVMCoreErrorObject *)error; + +// Can override the standard tab page control to not cache in tab. You should be following proper caching techniques (caching, updating when needed, deleting when needed), so this should be a last resort. +- (BOOL)shouldCacheInTabPageControl; + +#pragma mark - Response Handling + +// Called to begin observing for json updates. Called by default in view did load if pageTypesToListenFor returns an array with page types. +- (void)observeForResponseJSONUpdates; + +// Stops observing for json objects. +- (void)stopObservingForResponseJSONUpdates; + +// Returns an array of page types to observe for when we receive a response with JSON. Subclass this to have the ui update when the returned page types are cached. +- (nullable NSArray *)pageTypesToListenFor; + +// Returns an array of modules to observe for when we receive a response with JSON. Subclass this to have the ui update when the returned page types are cached. +- (nullable NSArray *)modulesToListenFor; + +// The function that gets called by the notification center when the JSON is updated. +- (void)responseJSONUpdated:(nonnull NSNotification *)notification; + +// Updates the json dictionary and the screen with the passed in dictionary. Subclass to get any custom behavior if necessary. +- (void)updateWithResponsePage:(nullable NSDictionary *)page modules:(nullable NSDictionary *)modules; + +#pragma mark - Navigation Item, Menu, Support, Top Alert + +// overide to set the navigation bar tint color +- (nullable UIColor *)navigationBarTintColor; + +// Sets the navigation bar color when the screen is loaded. Can be subclassed to change this logic. +- (nonnull UIColor *)navigationBarColor; + +// Default is no. +- (BOOL)navigationBarHidden; + +// Default is no. +- (BOOL)navigationBarTransparent; + +// Handles the navigation bar ui. +- (void)updateNavigationBarUI:(nonnull UINavigationController *)navigationController; + +// Returns if the master panel is initially accessible or not. This is always true in the base class. Subclass to override. +- (BOOL)isMasterInitiallyAccessible; + +// Returns if the support panel is initially accessible or not. This is always true in the base class. Subclass to override. +- (BOOL)isSupportInitiallyAccessible; + +// This returns a server driven flag. By default we don't show support before launchapp unless server says otherwise. +- (BOOL)showRightPanelForScreenBeforeLaunchApp; + +// Called when the user presses a menu option. Determines if we should load the option the default way or not. +- (BOOL)mainTableView:(nonnull MainMenuViewController *)mainTableView shouldSelectOptionAtIndexPath:(nonnull NSIndexPath *)indexPath; + +// applies an image to the navigation title +-(void)createTitleWithImageName:(nullable NSString *)imageName; + +#pragma mark - UITextField Functions + +// Resigns the first responder. +- (IBAction)textFieldDoneEditing:(nullable id)sender; + +// Dismisses the keyboard. +- (void)dismissFieldInput:(nullable id)sender; + +#pragma mark - TableView + +// For subclassing, returns the number of sections for table. Use this function instead of numberOfSectionsForTableview. +- (NSInteger)getNumberOfSections; + +#pragma mark - ButtonDelegateProtocol + +// Returns YES by default. +- (BOOL)button:(nonnull NSObject *)button shouldPerformActionWithMap:(nullable NSDictionary *)actionMap additionalData:(nullable NSDictionary *)additionalData; + +#pragma mark - MVMCoreActionDelegateProtocol + +// track the action which is fired +- (void)logActionWithActionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData; + +// Asks the load handler to load. standard. +- (void)handleOpenPageForRequestParameters:(nonnull MVMCoreRequestParameters *)requestParameters actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData NS_REQUIRES_SUPER; + +// Calls dismiss +- (void)handleBackAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData; + +// This will try to load the previous submission by default and append any additional data. +- (void)prepareRequestForPreviousSubmission:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData submit:(nonnull void (^)(MVMCoreRequestParameters * _Nonnull requestParameters, NSDictionary * _Nullable dataForPage))submit; + +// Does nothing at the moment. +- (void)willShowPopupWithAlertObject:(nonnull MVMCoreAlertObject *)alertObject alertJson:(nonnull NSDictionary *)alertJson; + +// Handle cancel +- (void)handleCancel:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData; + +// Calls the default. See MVMCoreActionHandler +- (void)handleUnknownActionType:(nullable NSString *)actionType actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData; + +// Calls the default. See MVMCoreActionHandler +- (void)handleActionError:(nonnull MVMCoreErrorObject *)error additionalData:(nullable NSDictionary *)additionalData; + +// Does nothing +- (void)prepareForOpenOtherAppModule:(nullable NSString *)module; + +#pragma mark - MVMCoreLoadDelegateProtocol + +/////----------------------------------------------------------------------------------- +// Standard Protocol Functions (refer to the MVMCoreLoadDelegateProtocol for more. +// Listed here in the .h so subclass could call [super] if need be. + +// By default, returns YES. +- (BOOL)shouldContinueToErrorPage:(nonnull MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)error; + +// Calls the default, see LoadHandler. +- (BOOL)handleModuleError:(nonnull NSString *)module loadObject:(nonnull MVMCoreLoadObject *)loadObject error:(nonnull MVMCoreErrorObject *)error; + +// By default, lets the alert object handle showing itself. +- (nullable MVMCoreAlertObject *)alertObjectToShow:(nonnull MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)errorObject; + +// By default, goes through all of the fields register with registerTextField and sets the error for them if needed. +- (void)handleFieldErrors:(nullable NSArray *)fieldErrors loadObject:(nonnull MVMCoreLoadObject *)loadObject; + +// Calls the default, see LoadHandler. +- (void)loadFinished:(nullable MVMCoreLoadObject *)loadObject loadedViewController:(nullable MFViewController *)loadedViewController error:(nullable MVMCoreErrorObject *)error __attribute__((objc_requires_super)); + +// By default, does nothing. +- (void)loadCancelled:(nullable MVMCoreLoadObject *)loadObject; + +#pragma mark - adobe analytics + +// add any addtional track data for the action that is fired with the main action informaiton. +- (nullable NSArray *)additionalActionsToTrackWithMainActionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData; + +// Returns action track data, it can be overrided for customization +- (nullable NSDictionary *)getActionTrackDataDictionaryForActionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData; + +// Initiates track page state +- (void)adobeTrackPageState; + +// can be subclassed to return any additional data for action tracking +- (nullable NSDictionary *)additionalDataToTrackActionWithActionInformation:(nullable NSDictionary *)actionInformation; + +// can be subclassed to return any additional data for page tracking +- (nullable NSDictionary *)additionalDataToTrackForPage; + +// can be subclased to return dynamic pagename values for page tracking +- (nullable NSArray *)dynamicPageNameValuesToTrackPage; + +#pragma mark - review app pop up + +//client side logic to prevent review app, it should only be configured for extra client logic to show or not show review app pop up +- (BOOL)shouldReviewApp; + +#pragma mark - extra logic for support + +- (nullable NSDictionary *)extraStartInfoForSupport; + +#pragma mark - Animation + +// main manager used for intro animations +@property (nullable, strong, nonatomic) MVMAnimationManager *introAnimationManager; +// property to check if controller has animations disabled +@property (assign) BOOL disableAnimations; + +// subclass to set up intro animations +- (void)setupIntroAnimations; + +// can be overriden to return the close button action map +- (nullable NSDictionary *)closeButtonActionMap; + +@end + diff --git a/MVMCoreUI/BaseControllers/MFViewController.m b/MVMCoreUI/BaseControllers/MFViewController.m new file mode 100644 index 00000000..fe6729d5 --- /dev/null +++ b/MVMCoreUI/BaseControllers/MFViewController.m @@ -0,0 +1,808 @@ +// +// MFViewController.m +// myverizon +// +// Created by Scott Pfeil on 11/26/13. +// Copyright (c) 2013 Verizon Wireless. All rights reserved. +// + +#import "MFViewController.h" +#import +#import +#import +#import "MVMCoreUISplitViewController.h" +#import +#import +#import "MVMCoreUITabBarPageControlViewController.h" +#import +#import "MFLoadImageView.h" +#import "MFFonts.h" +#import +#import +#import +#import +#import +#import +#import +#import +#import "NSLayoutConstraint+MFConvenience.h" +#import "UIColor+MFConvenience.h" +#import "MVMCoreUICommonViewsUtility.h" +#import "MFStyler.h" +#import "MVMCoreUIUtility.h" +#import "MVMCoreUIConstants.h" +#import "MVMCoreUISession.h" +#import "MVMCoreUILoggingHandler.h" + +@import MVMAnimationFramework; + +@interface MFViewController () + +// A flag for if this view controller is observing for cache updates or not. +@property (nonatomic) BOOL observingForResponseJSONUpdates; + +// A flag for if the initial load is finished or not. +@property (nonatomic) BOOL initialLoadFinished; + +// A mapping for mapping text fields for error keys +@property (strong, nonatomic) NSMutableDictionary *textFieldErrorMapping; + +// title view for navigation bar, used for custom navigation titles +@property (weak, nonatomic) UILabel *titleLabel; + +@end + +@implementation MFViewController + +- (void)dismiss { + if (self.presentingViewController) { + [[MVMCoreNavigationHandler sharedNavigationHandler] dismissViewController:self animated:YES]; + } else if (self.navigationController) { + [[MVMCoreNavigationHandler sharedNavigationHandler] popViewController:self animated:YES]; + } +} + +- (BOOL)isVisibleViewController { + return ((self.presentingViewController && !self.presentedViewController) || [self.navigationController topViewController] == self); +} + +- (void)registerTextField:(nonnull MFTextField *)textField forErrorKey:(nonnull NSString *)errorKey { + + if (!self.textFieldErrorMapping) { + self.textFieldErrorMapping = [NSMutableDictionary dictionary]; + } + [self.textFieldErrorMapping setObject:textField forKey:errorKey]; +} + +- (BOOL)screenSizeChanged { + return !CGSizeEqualToSize(self.previousScreenSize, CGSizeZero) && !fequalwiththreshold(self.previousScreenSize.width, self.view.bounds.size.width, .1); +} + +#pragma mark - Functions To Subclass + +- (BOOL)shouldFinishProcessingLoad:(nonnull MVMCoreLoadObject *)loadObject error:(MVMCoreErrorObject *_Nonnull *_Nonnull)error { + self.loadObject = loadObject; + self.pageType = loadObject.pageType; + return YES; +} + +// Sets the screen to use the screen heading. +// it is required in device flow, where we are showing greeting name as screen heading, +// device details screen heading needs to be updated/refreshed again, if user has changed device nick name +- (NSString *)screenHeading { + NSString *screenHeading = [self.loadObject.pageJSON string:KeyScreenHeading]; + return screenHeading; +} + +- (void)setScreenHeadingMessage:(nullable NSString *)screenHeadingMessage { + + if (screenHeadingMessage.length > 0) { + if (self.titleLabel) { + self.titleLabel.text = screenHeadingMessage; + } else { + self.navigationItem.title = screenHeadingMessage; + } + self.navigationItem.title = screenHeadingMessage; + self.navigationItem.accessibilityLabel = screenHeadingMessage; + if (self.navigationItem.titleView) { + self.navigationItem.titleView.accessibilityLabel = screenHeadingMessage; + } + } +} + +- (BOOL)checkforHeaderImage { + return [self.loadObject.pageJSON stringForKey:@"headerLogo"].length; +} + +-(void)createTitleWithImageName:(nullable NSString *)imageName { + UIView *titleView = [[UIView alloc] init]; + titleView.bounds = CGRectMake(CGRectGetMaxX(titleView.bounds), CGRectGetMaxY(titleView.bounds), 1, 1); + UIImageView *imageView = [[UIImageView alloc] initWithImage:[MVMCoreUIUtility imageNamed:imageName]]; + imageView.translatesAutoresizingMaskIntoConstraints = NO; + imageView.contentMode = UIViewContentModeScaleAspectFit; + [titleView addSubview:imageView]; + [NSLayoutConstraint constraintPinSubviewToSuperview:imageView]; + [NSLayoutConstraint constraintPinView:imageView heightConstraint:YES heightConstant:12 widthConstraint:YES widthConstant:127]; + // + [NSLayoutConstraint constraintPinView:titleView heightConstraint:YES heightConstant:1 widthConstraint:YES widthConstant:1]; + + [NSLayoutConstraint constraintPinSubview:imageView pinCenterX:YES pinCenterY:YES]; + + titleView.isAccessibilityElement = YES; + titleView.accessibilityLabel = [self screenHeading]; + titleView.accessibilityTraits = UIAccessibilityTraitHeader; + self.navigationItem.titleView = titleView; + +} + +- (void)newDataBuildScreen { + if ([self checkforHeaderImage]) { + // user header image + [self createTitleWithImageName:[self.loadObject.pageJSON stringForKey:@"headerLogo"]]; + } else { + // Sets the screen to use the screen heading. + NSString *screenHeading = [self screenHeading]; + + if (screenHeading) { + [self setScreenHeadingMessage:screenHeading]; + } + } +} + +- (void)initialLoad { + + // Creates an initial load object if needed. + if (!self.loadObject) { + self.loadObject = [[MVMCoreLoadObject alloc] initWithDelegate:self]; + } + + // Avoid the setter so we are only setting the bool and wait for view will appear to update the navigation bar. + _masterShouldBeAccessible = [self isMasterInitiallyAccessible]; + _supportShouldBeAccessible = [self isSupportInitiallyAccessible]; + + // Observe for cache updates if desired. + [self observeForResponseJSONUpdates]; +} + +- (void)updateViews { + +} + +- (void)backButtonPressed { + + // Sends keep alive to the server. + [[MVMCoreSessionTimeHandler sharedSessionHandler] sendKeepAliveToServer:NO]; + [[MVMCoreNavigationHandler sharedNavigationHandler] popViewController:(self.tabBarPageControl ?: self) animated:YES]; +} + +- (void)closeButtonPressed { + // TODO: Handle close button action with action map +} + +- (void)handleErrorAsPopup:(nonnull MVMCoreErrorObject *)error { + + // Logs the error. + if (error.logError) { + [MVMCoreLoggingHandler addErrorToLog:error]; + } + + MVMCoreLog(@"Error: %@ %@ %@ %@",[error stringErrorCode], error.domain, error.location,error.messageToDisplay); + if (!error.silentError) { + + // Show alert + MVMCoreAlertObject *alertObject = [[MVMCoreAlertObject alloc] initPopupAlertWithError:error isGreedy:NO]; + [[MVMCoreAlertHandler sharedAlertHandler] showAlertWithAlertObject:alertObject]; + } +} + +- (BOOL)shouldCacheInTabPageControl { + return YES; +} + +#pragma mark - Response Handling + +- (void)observeForResponseJSONUpdates { + if (!self.observingForResponseJSONUpdates && (self.pageTypesToListenFor.count > 0 || self.modulesToListenFor.count > 0)) { + self.observingForResponseJSONUpdates = YES; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(responseJSONUpdated:) name:NotificationResponseLoaded object:nil]; + } +} + +- (void)stopObservingForResponseJSONUpdates { + if (self.observingForResponseJSONUpdates) { + [[NSNotificationCenter defaultCenter] removeObserver:self name:NotificationResponseLoaded object:nil]; + self.observingForResponseJSONUpdates = NO; + } +} + +- (nullable NSArray *)pageTypesToListenFor { + return nil; +} + +- (nullable NSArray *)modulesToListenFor { + return nil; +} + +- (void)responseJSONUpdated:(nonnull NSNotification *)notification { + + // Checks for a page we are listening for. + NSArray *pageTypesListeningFor = [self pageTypesToListenFor]; + NSDictionary *pages = [notification.userInfo dict:KeyPageMap]; + __block NSDictionary *pageUpdated = nil; + [pageTypesListeningFor enumerateObjectsUsingBlock:^(NSString * _Nonnull pageToListenFor, NSUInteger idx, BOOL * _Nonnull stop) { + NSDictionary *page = [pages dict:pageToListenFor]; + if (page) { + pageUpdated = page; + *stop = YES; + } + }]; + + // Checks for modules we are listening for. + NSArray *modulesListeningFor = [self modulesToListenFor]; + NSDictionary *modules = [notification.userInfo dict:KeyModuleMap]; + __block NSMutableDictionary *modulesUpdated = [NSMutableDictionary dictionary]; + [modulesListeningFor enumerateObjectsUsingBlock:^(NSString * _Nonnull moduleToListenFor, NSUInteger idx, BOOL * _Nonnull stop) { + NSDictionary *module = [modules dict:moduleToListenFor]; + if (module) { + [modulesUpdated setObject:module forKey:moduleToListenFor]; + } + }]; + + [self updateWithResponsePage:pageUpdated modules:modulesUpdated]; +} + +- (void)updateWithResponsePage:(nullable NSDictionary *)page modules:(nullable NSDictionary *)modules { + + if (page || modules.count > 0) { + + [MVMCoreDispatchUtility performBlockOnMainThread:^{ + + if (modules) { + if (self.loadObject.modulesJSON) { + NSMutableDictionary *mutableDictionary = [NSMutableDictionary dictionaryWithDictionary:self.loadObject.modulesJSON]; + [mutableDictionary addEntriesFromDictionary:modules]; + self.loadObject.modulesJSON = [NSDictionary dictionaryWithDictionary:mutableDictionary]; + } else { + self.loadObject.modulesJSON = modules; + } + } + + if (page) { + self.loadObject.pageJSON = page; + } + + [self newDataBuildScreen]; + self.needToUpdateUI = YES; + [self.view setNeedsLayout]; + [self.view layoutIfNeeded]; + }]; + } +} + +#pragma mark - Navigation Item, Menu, Support + +- (nonnull UIColor *)navigationBarColor { + return [UIColor whiteColor]; +} + +- (BOOL)navigationBarHidden { + return NO; +} + +- (BOOL)navigationBarTransparent { + return NO; +} + +- (void)updateNavigationBarUI:(nonnull UINavigationController *)navigationController { + if (navigationController) { + [navigationController setNavigationBarHidden:[self navigationBarHidden] animated:NO]; + + [UIColor mfSetBackgroundColorForNavigationBar:[self navigationBarColor] navigationBar:navigationController.navigationBar transparent:[self navigationBarTransparent]]; + + UIColor *navigationBarTintColor = [self navigationBarTintColor] ?: [UIColor blackColor]; + navigationController.navigationBar.tintColor = navigationBarTintColor; + + // Have the navigation title match the tint color + if (self.titleLabel) { + self.titleLabel.textColor = navigationBarTintColor; + } else { + NSMutableDictionary *attributes = [[NSMutableDictionary alloc] initWithDictionary:navigationController.navigationBar.titleTextAttributes]; + [attributes setObject:navigationBarTintColor forKey:NSForegroundColorAttributeName]; + navigationController.navigationBar.titleTextAttributes = attributes; + } + + if (navigationController == [MVMCoreUISplitViewController mainSplitViewController].navigationController) { + // Update icons if main navigation controller. + [self setMasterShouldBeAccessible:self.masterShouldBeAccessible]; + [self setSupportShouldBeAccessible:self.supportShouldBeAccessible]; + [self showBottomProgressBar]; + [[MVMCoreUISession sharedGlobal].splitViewController setNavigationIconColor:navigationBarTintColor]; + + // Update separator. + UIView *separatorView = (UIView *)[MVMCoreUISession sharedGlobal].splitViewController.navigationBarSeparator; + separatorView.hidden = (self.class == [MVMCoreUITabBarPageControlViewController class] + || self.tabBarPageControl + || self.loadObject.requestParameters.tabWasPressed); + } + } +} + +- (BOOL)isMasterInitiallyAccessible { + if ([self.loadObject.pageJSON boolForKey:KeyHideMainMenu]) { + return NO; + } + return [MVMCoreUISession sharedGlobal].launchAppLoadedSuccessfully; +} + +- (void)setMasterShouldBeAccessible:(BOOL)masterShouldBeAccessible { + + MVMCoreUISplitViewController *splitViewController = [MVMCoreUISession sharedGlobal].splitViewController; + if (self.tabBarPageControl) { + [self.tabBarPageControl setMasterShouldBeAccessible:masterShouldBeAccessible]; + } else if ([self isVisibleViewController]) { + [splitViewController setLeftPanelIsAccessible:masterShouldBeAccessible forViewController:self]; + } + _masterShouldBeAccessible = masterShouldBeAccessible; +} + +- (BOOL)isSupportInitiallyAccessible { + return [MVMCoreUISession sharedGlobal].launchAppLoadedSuccessfully || [self showRightPanelForScreenBeforeLaunchApp]; +} + +- (BOOL)showRightPanelForScreenBeforeLaunchApp { + return [self.loadObject.pageJSON lenientBoolForKey:@"showRightPanel"]; +} + +- (void)setSupportShouldBeAccessible:(BOOL)supportShouldBeAccessible { + + MVMCoreUISplitViewController *splitViewController = [MVMCoreUISession sharedGlobal].splitViewController; + if (self.tabBarPageControl) { + [self.tabBarPageControl setSupportShouldBeAccessible:supportShouldBeAccessible]; + } else if ([self isVisibleViewController]) { + [splitViewController setRightPanelIsAccessible:supportShouldBeAccessible forViewController:self]; + } + _supportShouldBeAccessible = supportShouldBeAccessible; +} + +- (BOOL)mainTableView:(MainMenuViewController *)mainTableView shouldSelectOptionAtIndexPath:(NSIndexPath *)indexPath { + return YES; +} + +// sub class to change the navigation bar color +- (UIColor *)navigationBarTintColor { + return nil; +} + +- (void)showBottomProgressBar { + + MVMCoreUISplitViewController *splitViewController = [MVMCoreUISession sharedGlobal].splitViewController; + if ([self isVisibleViewController]) { + + NSString *progressAsString = [self.loadObject.pageJSON stringForKey:KeyProgressPercent]; + float progress = progressAsString.length > 0 ? [progressAsString floatValue]/100 : 0; + [splitViewController setBottomProgressBarProgress:progress]; + } +} + +#pragma mark - View lifecycle + +- (void)viewDidLoad { + [super viewDidLoad]; + // Do any additional setup after loading the view. + + self.navigationItem.hidesBackButton = YES; + + // init intro animation manager + MVMAnimationManager *introAnimationManager = [[MVMAnimationManager alloc] init]; + self.introAnimationManager = introAnimationManager; + + // Present the tooltip from the bottom over the tab bar controller. + if ([MVMCoreGetterUtility isOnIPad]) { + + // Different style for ipad. + self.modalPresentationStyle = UIModalPresentationFormSheet; + } else { + + // Standard. + self.modalPresentationStyle = UIModalPresentationOverCurrentContext; + } + + MVMCoreLog(@"View Controller Loaded : %@",NSStringFromClass([self class])); + // Do some initial loading. + if (!self.initialLoadFinished) { + self.initialLoadFinished = YES; + [self initialLoad]; + } + + // Since we have new data, build stuff for the screen. + [self newDataBuildScreen]; + + // Update the UI after the view is loaded. + self.needToUpdateUI = YES; + self.needToupdateUIOnScreenSizeChanges = YES; + + if (UIAccessibilityIsVoiceOverRunning()) { + self.disableAnimations = YES; + } + + if (!self.disableAnimations) { + [self setupIntroAnimations]; + } +} + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. + + [[MVMCoreCache sharedCache] clearImageCache]; +} + +- (void)viewDidLayoutSubviews { + // Updates the views if necessary + if (self.needToUpdateUI || (self.needToupdateUIOnScreenSizeChanges && [self screenSizeChanged])) { + + // Add to fix a strange bug where the width is zero and things get messed up. + if ([self isViewLoaded] && (NSInteger)CGRectGetWidth(self.view.bounds) > 1) { + + [self updateViews]; + self.needToUpdateUI = NO; + } + } + + self.previousScreenSize = self.view.bounds.size; + + [super viewDidLayoutSubviews]; +} + +- (void)viewWillAppear:(BOOL)animated { + [super viewWillAppear:animated]; + + // Update the navigation bar ui when view is appearing. Don't handle if there is a tab bar page control, it will be handled later. + if (!self.tabBarPageControl) { + [self updateNavigationBarUI:self.navigationController]; + } +} + +- (void)viewDidAppear:(BOOL)animated { + [super viewDidAppear:animated]; + + // Don't track page state if there is a tab bar page control, it will be handled later. + if (!self.tabBarPageControl) { + [self adobeTrackPageState]; + } + + // perform intro animations + if (!self.disableAnimations) { + [self.introAnimationManager performAnimations]; + } +} + +- (void)dealloc { + [self stopObservingForResponseJSONUpdates]; + MVMCoreLog(@"%@ deallocated", [[self class] description]); +} + +- (BOOL)shouldAutorotate { + return YES; +} + +- (UIInterfaceOrientationMask)supportedInterfaceOrientations { + + if ([MVMCoreGetterUtility isOnIPad]) { + return UIInterfaceOrientationMaskAll; + } else { + return UIInterfaceOrientationMaskPortrait; + } +} + +- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id)coordinator { + + [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; + + // Updates the detail view width. + void (^completion)(id) = ^(id context) { + [self.view setNeedsLayout]; + }; + [coordinator animateAlongsideTransition:^(id context) { + } completion:completion]; +} + +#pragma mark - UITextField Functions + +// To Remove TextFields Bug: Keyboard is not dismissing after reaching textfield max length limit +- (BOOL)textFieldShouldReturn:(UITextField *)textField { + [textField resignFirstResponder]; + return YES; +} + +- (IBAction)textFieldDoneEditing:(id)sender { + [sender resignFirstResponder]; +} + +- (void)textFieldDidBeginEditing:(UITextField *)textField { + self.selectedField = textField; + //Accessibility + if (UIAccessibilityIsVoiceOverRunning()) { + if ([self textFieldHasDoneButton:textField]) {//If there is no toolbar and done, input view can't be dismissed + [self.view setAccessibilityElements:@[textField.inputView,textField.inputAccessoryView]]; + } + [self performSelector:@selector(focusElement:) withObject:textField.inputView afterDelay:0.1]; + } +} + +- (BOOL)textFieldHasDoneButton:(UITextField *)textField { + return [textField.inputAccessoryView isKindOfClass:[UIToolbar class]] && [[[((UIToolbar *)textField.inputAccessoryView) items] lastObject] isKindOfClass:[UIBarButtonItem class]] && [textField.inputView isKindOfClass:[UIPickerView class]]; +} + +- (void)textFieldDidEndEditing:(UITextField *)textField { + + if (textField == self.selectedField) { + //Accessibility + if (UIAccessibilityIsVoiceOverRunning()) { + [self.view setAccessibilityElements:nil]; + [self performSelector:@selector(focusElement:) withObject:textField afterDelay:0.1]; + } + self.selectedField = nil; + } +} + +- (void)dismissFieldInput:(id)sender { + if (self.selectedField) { + [self.selectedField resignFirstResponder]; + } +} + +#pragma mark - UITextView Functions + +- (BOOL)textViewShouldBeginEditing:(UITextView *)textView { + self.selectedField = textView; + return YES; +} + +- (void)textViewDidEndEditing:(UITextView *)textView { + if (textView == self.selectedField) { + self.selectedField = nil; + } +} + +#pragma mark - TableView + +- (NSInteger)getNumberOfSections { + NSInteger numberOfSections = 1; + return numberOfSections; +} + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + NSInteger numberOfSections = 0; + + // Fixes a funky issue where the table is being loaded before it should be. + if (CGRectGetWidth(tableView.bounds) > 1) { + numberOfSections = [self getNumberOfSections]; + } + + return numberOfSections; +} + +#pragma mark - ButtonDelegateProtocol + +- (BOOL)button:(nonnull NSObject *)button shouldPerformActionWithMap:(nullable NSDictionary *)actionMap additionalData:(nullable NSDictionary *)additionalData { + return YES; +} + +#pragma mark - MVMCoreActionDelegateProtocol + +- (void)logActionWithActionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData { + [[MVMCoreUILoggingHandler sharedLoggingHandler] defaultLogActionForController:self actionInformation:actionInformation additionalData:additionalData]; +} + +- (void)handleOpenPageForRequestParameters:(nonnull MVMCoreRequestParameters *)requestParameters actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData { + + if (requestParameters.openSupportPanel) { + [[MVMCoreUISession sharedGlobal].splitViewController.rightPanel willOpenWithActionInformation:actionInformation]; + } + + requestParameters.parentPageType = [self.loadObject.pageJSON stringForKey:@"parentPageType"]; + + [[MVMCoreLoadHandler sharedGlobal] loadRequest:requestParameters dataForPage:additionalData delegate:self]; +} + +- (void)handleBackAction:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData { + BOOL openSupportPanel = [actionInformation boolForKey:KeyOpenSupport]; + if (openSupportPanel) { + [[MVMCoreUISession sharedGlobal].splitViewController.rightPanel willOpenWithActionInformation:actionInformation]; + } + + if (self.tabBarPageControl) { + [self.tabBarPageControl handleBackAction:actionInformation additionalData:additionalData]; + } else { + [self dismiss]; + } +} + +- (void)shouldLinkAwayWithURL:(nullable NSURL *)URL appURL:(nullable NSURL *)appURL actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData linkAwayBlock:(nonnull void (^)(NSURL * _Nullable, NSURL * _Nullable, NSDictionary * _Nullable, NSDictionary * _Nullable))linkAwayBlock { + linkAwayBlock(appURL,URL,actionInformation,additionalData); +} + +- (void)prepareRequestForPreviousSubmission:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData submit:(nonnull void (^)(MVMCoreRequestParameters * _Nonnull requestParameters, NSDictionary * _Nullable dataForPage))submit { + + // Combines data + NSDictionary *dataForPage = self.loadObject.dataForPage; + if (dataForPage && additionalData) { + + NSMutableDictionary *mutableData = [NSMutableDictionary dictionaryWithDictionary:dataForPage]; + [mutableData addEntriesFromDictionary:additionalData]; + dataForPage = mutableData; + } else if (additionalData) { + dataForPage = additionalData; + } + + // Makes previous request + submit(self.loadObject.requestParameters,dataForPage); +} + +- (void)willShowPopupWithAlertObject:(nonnull MVMCoreAlertObject *)alertObject alertJson:(nonnull NSDictionary *)alertJson { +} + +- (nullable MVMCoreAlertObject *)willShowTopAlertWithAlertObject:(nonnull MVMCoreAlertObject *)alertObject alertJson:(nonnull NSDictionary *)alertJson { + if (self.currentTopAlertPageType && [self.currentTopAlertPageType isEqualToString:[alertJson string:KeyPageType]]) { + return nil; + } else { + return alertObject; + } +} + +// Handle cancel +- (void)handleCancel:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData { + +} + +- (void)handleUnknownActionType:(nullable NSString *)actionType actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData { + + [MVMCoreActionHandler defaultHandleUnknownActionType:actionType actionInformation:actionInformation additionalData:additionalData delegate:self]; +} + +- (void)handleActionError:(nonnull MVMCoreErrorObject *)error additionalData:(nullable NSDictionary *)additionalData { + + [MVMCoreActionHandler defaultHandleActionError:error additionalData:additionalData]; +} + +- (void)prepareForOpenOtherAppModule:(nullable NSString *)module { + +} + +#pragma mark - MVMCoreLoadDelegateProtocol + +- (BOOL)checkForDelegateSpecificErrors:(nullable MVMCoreErrorObject *)errorObject loadObject:(nonnull MVMCoreLoadObject *)loadObject completionHandler:(nonnull void (^)(BOOL shouldContinueLoad, MVMCoreLoadObject * _Nullable loadObject, MVMCoreErrorObject * _Nullable error))completionHandler { + return [MVMCoreLoadHandler defaultCheckForSpecificErrors:errorObject loadObject:loadObject]; +} + +- (BOOL)shouldContinueToErrorPage:(nonnull MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)error { + return YES; +} + +- (BOOL)handleModuleError:(nonnull NSString *)module loadObject:(nonnull MVMCoreLoadObject *)loadObject error:(nonnull MVMCoreErrorObject *)error { + return [MVMCoreLoadHandler defaultHandleModuleError:module loadObject:loadObject error:error]; +} + +- (nullable MVMCoreAlertObject *)alertObjectToShow:(nonnull MVMCoreLoadObject *)loadObject error:(nullable MVMCoreErrorObject *)errorObject { + return [MVMCoreAlertObject alertObjectForLoadObject:loadObject error:errorObject actionDelegate:self]; +} + +- (void)handleFieldErrors:(nullable NSArray *)fieldErrors loadObject:(nonnull MVMCoreLoadObject *)loadObject { + + if (self.textFieldErrorMapping.count > 0) { + NSMutableArray *enabledTextField = [NSMutableArray new]; + for (NSUInteger i = 0; i < fieldErrors.count; i++) { + + NSDictionary *info = [fieldErrors objectAtIndex:i ofType:[NSDictionary class]]; + NSString *fieldName = [info stringForKey:KeyFieldName]; + MFTextField *textField = [self.textFieldErrorMapping objectForKey:fieldName ofType:[MFTextField class]]; + if (textField && textField.enabled) { + [textField setErrorMessage:[info stringForKey:KeyUserMessage]]; + [enabledTextField addObject:textField]; + } + } + if ([enabledTextField count] > 0) { + MFTextField *firstErrorTextField = enabledTextField[0]; + [firstErrorTextField pushAccessibilityNotification]; + } + } +} + +- (void)loadFinished:(nullable MVMCoreLoadObject *)loadObject loadedViewController:(nullable MFViewController *)loadedViewController error:(nullable MVMCoreErrorObject *)error { + + // Open the support panel +#warning Scott/Chris, decide if we want to do this if there is an error. + if (!error && (loadObject.requestParameters.openSupportPanel || [loadObject.systemParametersJSON boolForKey:KeyOpenSupport])) { + [[MVMCoreUISession sharedGlobal].splitViewController showRightPanelAnimated:YES]; + } + [[MVMCoreUILoggingHandler sharedLoggingHandler] defaultTrackLoadFinishedForController:self loadObject:loadObject]; +} + +- (void)loadCancelled:(nullable MVMCoreLoadObject *)loadObject { + +} + +#pragma mark - TopAlertDelegateProtocol + +- (void)topAlertViewShown:(nonnull id)topAlert topAlertObject:(nonnull MVMCoreTopAlertObject *)topAlertObject { + self.currentTopAlertPageType = topAlertObject.pageType; +} + +- (void)topAlertViewDismissed:(nonnull id)topAlert { + self.currentTopAlertPageType = nil; +} + +- (BOOL)shouldLoadTopAlertAction:(nullable NSDictionary *)actionMap additionalData:(nullable NSDictionary *)additionalData { + if (![[actionMap stringForKey:KeyPageType] isEqualToString:self.loadObject.requestParameters.pageType]) { + return YES; + } else { + return NO; + } +} + +#pragma mark - MVMCoreViewManagerViewControllerProtocol + +- (void)viewControllerReadyInManager:(nonnull id )manager { + // The screen is officially ready. Only update the navigation bar if initial load has finished. + if (manager == self.tabBarPageControl) { + if (self.initialLoadFinished) { + [self updateNavigationBarUI:self.tabBarPageControl.navigationController]; + } + [self adobeTrackPageState]; + } +} + +#pragma mark - adobe analytics + +- (nullable NSArray *)additionalActionsToTrackWithMainActionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData { + return nil; +} + +- (nullable NSDictionary *)getActionTrackDataDictionaryForActionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData { + return [[MVMCoreUILoggingHandler sharedLoggingHandler] defaultGetActionTrackDataDictionaryForController:self actionInformation:actionInformation additionalData:additionalData]; +} + +- (void)adobeTrackPageState { + [[MVMCoreUILoggingHandler sharedLoggingHandler] defaultLogPageStateForController:self]; +} + +- (nullable NSDictionary *)additionalDataToTrackActionWithActionInformation:(nullable NSDictionary *)actionInformation { + return nil; +} + +- (nullable NSDictionary *)additionalDataToTrackForPage { + return nil; +} + +- (nullable NSArray *)dynamicPageNameValuesToTrackPage { + return nil; +} + +#pragma mark - review app pop up + +//client side logic to prevent review app, it should only be configured for extra client logic to show or not show review app pop up +- (BOOL)shouldReviewApp { + return YES; +} + +//Accessibility +- (void) focusElement:(id) element { + dispatch_async(dispatch_get_main_queue(), ^{ + UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, element); + }); +} + +// support + +- (NSDictionary *)extraStartInfoForSupport { + return nil; +} + +#pragma mark - Animations +// subclass to override default intro animations +-(void) setupIntroAnimations { + +} + +@end diff --git a/MVMCoreUI/BaseControllers/ProgrammaticScrollViewController.m b/MVMCoreUI/BaseControllers/ProgrammaticScrollViewController.m index 792a346b..fab82151 100644 --- a/MVMCoreUI/BaseControllers/ProgrammaticScrollViewController.m +++ b/MVMCoreUI/BaseControllers/ProgrammaticScrollViewController.m @@ -8,7 +8,7 @@ #import "ProgrammaticScrollViewController.h" #import -#import "NSLayoutConstraint+MVMCoreUIConvenience.h" +#import "NSLayoutConstraint+MFConvenience.h" #import "MVMCoreUICommonViewsUtility.h" @interface ProgrammaticScrollViewController () diff --git a/MVMCoreUI/Categories/NSLayoutConstraint+MVMCoreUIConvenience.h b/MVMCoreUI/Categories/NSLayoutConstraint+MFConvenience.h similarity index 98% rename from MVMCoreUI/Categories/NSLayoutConstraint+MVMCoreUIConvenience.h rename to MVMCoreUI/Categories/NSLayoutConstraint+MFConvenience.h index dc7b4f0a..ed9d1876 100644 --- a/MVMCoreUI/Categories/NSLayoutConstraint+MVMCoreUIConvenience.h +++ b/MVMCoreUI/Categories/NSLayoutConstraint+MFConvenience.h @@ -1,5 +1,5 @@ // -// NSLayoutConstraint+MVMCoreUIConvenience.h +// NSLayoutConstraint+MFConvenience.h // myverizon // // Created by Chris Yang on 1/15/16. @@ -24,7 +24,7 @@ extern NSString * _Nonnull const ConstraintCenterY; extern NSString * _Nonnull const ConstraintHeight; extern NSString * _Nonnull const ConstraintWidth; -@interface NSLayoutConstraint (MVMCoreUIConvenience) +@interface NSLayoutConstraint (MFConvenience) //this will pin subview to superview + (nullable NSDictionary *)constraintPinSubviewToSuperview:(nullable UIView *)subview; diff --git a/MVMCoreUI/Categories/NSLayoutConstraint+MVMCoreUIConvenience.m b/MVMCoreUI/Categories/NSLayoutConstraint+MFConvenience.m similarity index 98% rename from MVMCoreUI/Categories/NSLayoutConstraint+MVMCoreUIConvenience.m rename to MVMCoreUI/Categories/NSLayoutConstraint+MFConvenience.m index 66be44d3..1ed0acd1 100644 --- a/MVMCoreUI/Categories/NSLayoutConstraint+MVMCoreUIConvenience.m +++ b/MVMCoreUI/Categories/NSLayoutConstraint+MFConvenience.m @@ -1,12 +1,12 @@ // -// NSLayoutConstraint+MVMCoreUIConvenience.m +// NSLayoutConstraint+MFConvenience.m // myverizon // // Created by Chris Yang on 1/15/16. // Copyright © 2016 Verizon Wireless. All rights reserved. // -#import "NSLayoutConstraint+MVMCoreUIConvenience.h" +#import "NSLayoutConstraint+MFConvenience.h" //constraint constants NSString *const ConstraintTop = @"top"; @@ -18,7 +18,7 @@ NSString *const ConstraintCenterY = @"centerY"; NSString *const ConstraintHeight = @"height"; NSString *const ConstraintWidth = @"width"; -@implementation NSLayoutConstraint (MVMCoreUIConvenience) +@implementation NSLayoutConstraint (MFConvenience) + (NSDictionary *)constraintPinSubviewToSuperview:(UIView *)subview { return [NSLayoutConstraint constraintPinSubview:subview pinTop:YES pinBottom:YES pinLeft:YES pinRight:YES]; diff --git a/MVMCoreUI/Categories/UIColor+MVMCoreUIConvenience.h b/MVMCoreUI/Categories/UIColor+MFConvenience.h similarity index 98% rename from MVMCoreUI/Categories/UIColor+MVMCoreUIConvenience.h rename to MVMCoreUI/Categories/UIColor+MFConvenience.h index dcd28e14..c7b6a950 100644 --- a/MVMCoreUI/Categories/UIColor+MVMCoreUIConvenience.h +++ b/MVMCoreUI/Categories/UIColor+MFConvenience.h @@ -1,5 +1,5 @@ // -// UIColor+MVMCoreUIConvenience.h +// UIColor+MFConvenience.h // mobilefirst // // Created by Chris Yang on 2/21/16. @@ -8,7 +8,7 @@ #import -@interface UIColor (MVMCoreUIConvenience) +@interface UIColor (MFConvenience) #pragma mark - 2.0 diff --git a/MVMCoreUI/Categories/UIColor+MVMCoreUIConvenience.m b/MVMCoreUI/Categories/UIColor+MFConvenience.m similarity index 99% rename from MVMCoreUI/Categories/UIColor+MVMCoreUIConvenience.m rename to MVMCoreUI/Categories/UIColor+MFConvenience.m index b9d4e9d4..e73dccd4 100644 --- a/MVMCoreUI/Categories/UIColor+MVMCoreUIConvenience.m +++ b/MVMCoreUI/Categories/UIColor+MFConvenience.m @@ -1,15 +1,15 @@ // -// UIColor+MVMCoreUIConvenience.m +// UIColor+MFConvenience.m // mobilefirst // // Created by Chris Yang on 2/21/16. // Copyright © 2016 Verizon Wireless. All rights reserved. // -#import "UIColor+MVMCoreUIConvenience.h" +#import "UIColor+MFConvenience.h" #import -@implementation UIColor (MVMCoreUIConvenience) +@implementation UIColor (MFConvenience) #pragma mark - 2.0 diff --git a/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m b/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m index 033194d3..7db9fd67 100644 --- a/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m +++ b/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m @@ -13,12 +13,12 @@ #import #import #import "MVMCoreUIUtility.h" -#import "UIColor+MVMCoreUIConvenience.h" -#import "NSLayoutConstraint+MVMCoreUIConvenience.h" +#import "UIColor+MFConvenience.h" +#import "NSLayoutConstraint+MFConvenience.h" #import "MFViewController.h" #import "MFFonts.h" #import "MFLoadingViewController.h" -#import "MFSizeObject.h" +#import #import "SeparatorView.h" #import "MVMCoreUISession.h" #import "MVMCoreUIConstants.h" diff --git a/MVMCoreUI/Containers/TabBarController/MVMCoreUITabBarPageControlViewController.m b/MVMCoreUI/Containers/TabBarController/MVMCoreUITabBarPageControlViewController.m index ad428c17..39320dad 100644 --- a/MVMCoreUI/Containers/TabBarController/MVMCoreUITabBarPageControlViewController.m +++ b/MVMCoreUI/Containers/TabBarController/MVMCoreUITabBarPageControlViewController.m @@ -14,7 +14,7 @@ #import #import #import -#import "UIColor+MVMCoreUIConvenience.h" +#import "UIColor+MFConvenience.h" #import #import #import "SeparatorView.h" diff --git a/MVMCoreUI/Containers/TabBarController/TopTabbar.m b/MVMCoreUI/Containers/TabBarController/TopTabbar.m index 689ff1ae..bc114d36 100644 --- a/MVMCoreUI/Containers/TabBarController/TopTabbar.m +++ b/MVMCoreUI/Containers/TabBarController/TopTabbar.m @@ -10,8 +10,8 @@ #import "MVMCoreUICommonViewsUtility.h" #import "MFStyler.h" #import -#import "UIColor+MVMCoreUIConvenience.h" -#import "NSLayoutConstraint+MVMCoreUIConvenience.h" +#import "UIColor+MFConvenience.h" +#import "NSLayoutConstraint+MFConvenience.h" #import "MVMCoreUIUtility.h" #import #import "MVMCoreUICommonViewsUtility.h" diff --git a/MVMCoreUI/MVMCoreUI.h b/MVMCoreUI/MVMCoreUI.h index 94fb4647..f04bc94f 100644 --- a/MVMCoreUI/MVMCoreUI.h +++ b/MVMCoreUI/MVMCoreUI.h @@ -17,14 +17,28 @@ FOUNDATION_EXPORT const unsigned char MVMCoreUIVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import #import +#pragma mark - TopAlert #import +#import +#import +#import +#import + +#pragma mark - OtherHandlers +#import + +#pragma mark - Categories +#import +#import #pragma mark - Styles #import #pragma mark - Utility +#import #import #import +#import #import #import @@ -34,6 +48,7 @@ FOUNDATION_EXPORT const unsigned char MVMCoreUIVersionString[]; #import #import #import +#import #pragma mark - Containers #import @@ -51,9 +66,13 @@ FOUNDATION_EXPORT const unsigned char MVMCoreUIVersionString[]; #import #import #import +#import #import #import #import +#import +#import +#import #pragma mark Buttons #import diff --git a/MVMCoreUI/OtherHandlers/MVMCoreUILoggingHandler.h b/MVMCoreUI/OtherHandlers/MVMCoreUILoggingHandler.h index 2b564ad0..26678257 100644 --- a/MVMCoreUI/OtherHandlers/MVMCoreUILoggingHandler.h +++ b/MVMCoreUI/OtherHandlers/MVMCoreUILoggingHandler.h @@ -8,12 +8,24 @@ #import +@class MFViewController; + NS_ASSUME_NONNULL_BEGIN @interface MVMCoreUILoggingHandler : MVMCoreLoggingHandler - (void)logTopAlertAction:(nonnull MVMCoreTopAlertObject *)topAlertObject actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData; +// Page State Logging +- (void)defaultLogPageStateForController:(nonnull MFViewController *)controller; + +// Action Logging +- (void)defaultLogActionForController:(nonnull MFViewController *)controller actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData; +- (nullable NSDictionary *)defaultGetActionTrackDataDictionaryForController:(nonnull MFViewController *)controller actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData; + +// Load Logging +- (void)defaultTrackLoadFinishedForController:(nonnull MFViewController *)controller loadObject:(nullable MVMCoreLoadObject *)loadObject; + @end NS_ASSUME_NONNULL_END diff --git a/MVMCoreUI/OtherHandlers/MVMCoreUILoggingHandler.m b/MVMCoreUI/OtherHandlers/MVMCoreUILoggingHandler.m index 33903f0c..1d538bc2 100644 --- a/MVMCoreUI/OtherHandlers/MVMCoreUILoggingHandler.m +++ b/MVMCoreUI/OtherHandlers/MVMCoreUILoggingHandler.m @@ -13,4 +13,17 @@ - (void)logTopAlertAction:(nonnull MVMCoreTopAlertObject *)topAlertObject actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData { } +- (void)defaultLogPageStateForController:(nonnull MFViewController *)controller { +} + +- (void)defaultLogActionForController:(nonnull MFViewController *)controller actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData { +} + +- (nullable NSDictionary *)defaultGetActionTrackDataDictionaryForController:(nonnull MFViewController *)controller actionInformation:(nullable NSDictionary *)actionInformation additionalData:(nullable NSDictionary *)additionalData { + return nil; +} + +- (void)defaultTrackLoadFinishedForController:(nonnull MFViewController *)controller loadObject:(nullable MVMCoreLoadObject *)loadObject { +} + @end diff --git a/MVMCoreUI/Session/MVMCoreUISession.h b/MVMCoreUI/Session/MVMCoreUISession.h index a68a1515..b5ac2d6c 100644 --- a/MVMCoreUI/Session/MVMCoreUISession.h +++ b/MVMCoreUI/Session/MVMCoreUISession.h @@ -20,6 +20,9 @@ NS_ASSUME_NONNULL_BEGIN // for handscroll Animation on subclasses of MFScrollingViewController @property (assign, nonatomic) BOOL enableHandScrollAnimation; +//indicates if the app launched successfully +@property (assign, nonatomic) BOOL launchAppLoadedSuccessfully; + @end NS_ASSUME_NONNULL_END diff --git a/MVMCoreUI/Styles/MFStyler.m b/MVMCoreUI/Styles/MFStyler.m index 0b6e19d1..4367b37e 100644 --- a/MVMCoreUI/Styles/MFStyler.m +++ b/MVMCoreUI/Styles/MFStyler.m @@ -8,9 +8,9 @@ #import "MFStyler.h" #import "MFFonts.h" -#import "MFSizeObject.h" -#import "UIColor+MVMCoreUIConvenience.h" -#import "NSLayoutConstraint+MVMCoreUIConvenience.h" +#import +#import "UIColor+MFConvenience.h" +#import "NSLayoutConstraint+MFConvenience.h" #import "MVMCoreUISplitViewController.h" CGFloat const PaddingDefault = 24; diff --git a/MVMCoreUI/SupportingFiles/Fonts/NHaasGroteskDSStd-45Lt.otf b/MVMCoreUI/SupportingFiles/Fonts/NHaasGroteskDSStd-45Lt.otf new file mode 100644 index 00000000..bddef9eb Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Fonts/NHaasGroteskDSStd-45Lt.otf differ diff --git a/MVMCoreUI/SupportingFiles/Fonts/NHaasGroteskDSStd-55Rg.otf b/MVMCoreUI/SupportingFiles/Fonts/NHaasGroteskDSStd-55Rg.otf new file mode 100644 index 00000000..f56ed7aa Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Fonts/NHaasGroteskDSStd-55Rg.otf differ diff --git a/MVMCoreUI/SupportingFiles/Fonts/NHaasGroteskDSStd-75Bd.otf b/MVMCoreUI/SupportingFiles/Fonts/NHaasGroteskDSStd-75Bd.otf new file mode 100644 index 00000000..fbcba354 Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Fonts/NHaasGroteskDSStd-75Bd.otf differ diff --git a/MVMCoreUI/SupportingFiles/Fonts/OCRAExtended.ttf b/MVMCoreUI/SupportingFiles/Fonts/OCRAExtended.ttf new file mode 100644 index 00000000..05ebc1d1 Binary files /dev/null and b/MVMCoreUI/SupportingFiles/Fonts/OCRAExtended.ttf differ diff --git a/MVMCoreUI/TopAlert/MVMCoreUITopAlertBaseView.m b/MVMCoreUI/TopAlert/MVMCoreUITopAlertBaseView.m index 31f13545..08b92f1a 100644 --- a/MVMCoreUI/TopAlert/MVMCoreUITopAlertBaseView.m +++ b/MVMCoreUI/TopAlert/MVMCoreUITopAlertBaseView.m @@ -15,7 +15,7 @@ #import "MVMCoreUITopAlertView.h" #import #import -#import "UIColor+MVMCoreUIConvenience.h" +#import "UIColor+MFConvenience.h" #import "MVMCoreUICommonViewsUtility.h" #import "MFStyler.h" #import "MVMCoreUISession.h" diff --git a/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.h b/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.h index 7d30eb7b..d1b2d470 100644 --- a/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.h +++ b/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.h @@ -7,7 +7,7 @@ // #import -#import "MVMCoreUITopAlertBaseView.h" +#import #import @class PrimaryButton; diff --git a/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.m b/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.m index 501e1d2c..c6a53691 100644 --- a/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.m +++ b/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.m @@ -16,7 +16,7 @@ #import #import #import "MFStyler.h" -#import "NSLayoutConstraint+MVMCoreUIConvenience.h" +#import "NSLayoutConstraint+MFConvenience.h" #import "MVMCoreUIUtility.h" @interface MVMCoreUITopAlertExpandableView () diff --git a/MVMCoreUI/TopAlert/MVMCoreUITopAlertMainView.h b/MVMCoreUI/TopAlert/MVMCoreUITopAlertMainView.h index e2754253..6ebd1026 100644 --- a/MVMCoreUI/TopAlert/MVMCoreUITopAlertMainView.h +++ b/MVMCoreUI/TopAlert/MVMCoreUITopAlertMainView.h @@ -7,7 +7,7 @@ // #import -#import "MVMCoreUITopAlertBaseView.h" +#import #import @class PrimaryButton; diff --git a/MVMCoreUI/TopAlert/MVMCoreUITopAlertMainView.m b/MVMCoreUI/TopAlert/MVMCoreUITopAlertMainView.m index 0f00c1ec..e0595e7c 100644 --- a/MVMCoreUI/TopAlert/MVMCoreUITopAlertMainView.m +++ b/MVMCoreUI/TopAlert/MVMCoreUITopAlertMainView.m @@ -8,12 +8,12 @@ #import "MVMCoreUITopAlertMainView.h" #import "MFStyler.h" -#import "NSLayoutConstraint+MVMCoreUIConvenience.h" +#import "NSLayoutConstraint+MFConvenience.h" #import #import "PrimaryButton.h" #import #import -#import "UIColor+MVMCoreUIConvenience.h" +#import "UIColor+MFConvenience.h" #import #import "MFLoadImageView.h" #import diff --git a/MVMCoreUI/TopAlert/MVMCoreUITopAlertShortView.h b/MVMCoreUI/TopAlert/MVMCoreUITopAlertShortView.h index f0f5c3a8..02ea2f2a 100644 --- a/MVMCoreUI/TopAlert/MVMCoreUITopAlertShortView.h +++ b/MVMCoreUI/TopAlert/MVMCoreUITopAlertShortView.h @@ -7,7 +7,7 @@ // #import -#import "MVMCoreUITopAlertBaseView.h" +#import @class MVMCoreTopAlertObject; @class MFCustomButton; diff --git a/MVMCoreUI/TopAlert/MVMCoreUITopAlertShortView.m b/MVMCoreUI/TopAlert/MVMCoreUITopAlertShortView.m index b709d957..8307a595 100644 --- a/MVMCoreUI/TopAlert/MVMCoreUITopAlertShortView.m +++ b/MVMCoreUI/TopAlert/MVMCoreUITopAlertShortView.m @@ -8,7 +8,7 @@ #import "MVMCoreUITopAlertShortView.h" #import "MFStyler.h" -#import "NSLayoutConstraint+MVMCoreUIConvenience.h" +#import "NSLayoutConstraint+MFConvenience.h" #import #import "MVMCoreUIConstants.h" diff --git a/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.h b/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.h index 6c2ac2ad..90c60f6d 100644 --- a/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.h +++ b/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.h @@ -7,14 +7,13 @@ // #import -#import "MFCustomButton.h" #import #import #import -#import "ButtonDelegateProtocol.h" +#import #import #import -#import "MFView.h" +#import @class MVMCoreTopAlertObject; diff --git a/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.m b/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.m index 106b468f..a236fdd2 100644 --- a/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.m +++ b/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.m @@ -21,9 +21,9 @@ #import #import #import "MVMCoreUICommonViewsUtility.h" -#import "UIColor+MVMCoreUIConvenience.h" +#import "UIColor+MFConvenience.h" #import -#import "NSLayoutConstraint+MVMCoreUIConvenience.h" +#import "NSLayoutConstraint+MFConvenience.h" #import #import #import diff --git a/MVMCoreUI/Utility/MFFonts.m b/MVMCoreUI/Utility/MFFonts.m index f9131600..b69efc1a 100644 --- a/MVMCoreUI/Utility/MFFonts.m +++ b/MVMCoreUI/Utility/MFFonts.m @@ -8,12 +8,14 @@ #import "MFFonts.h" #import +#import "MVMCoreUIUtility.h" +#import @implementation MFFonts + (void)loadFont:(NSString *)fontName type:(NSString *)type{ - NSString *fontPath = [[MVMCoreUtility bundleForMVMCoreUI] pathForResource:fontName ofType:type]; + NSString *fontPath = [[MVMCoreUIUtility bundleForMVMCoreUI] pathForResource:fontName ofType:type]; NSData *inData = [NSData dataWithContentsOfFile:fontPath]; CFErrorRef error; CGDataProviderRef provider = CGDataProviderCreateWithCFData((CFDataRef)inData); @@ -21,7 +23,7 @@ CGFontRef font = CGFontCreateWithDataProvider(provider); if (!CTFontManagerRegisterGraphicsFont(font, &error)) { CFStringRef errorDescription = CFErrorCopyDescription(error); - MFDLog(@"Failed to load font: %@", errorDescription); + MVMCoreLog(@"Failed to load font: %@", errorDescription); CFRelease(errorDescription); } CFRelease(font); diff --git a/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.h b/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.h index 51467225..ca0db027 100644 --- a/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.h +++ b/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.h @@ -13,8 +13,6 @@ @class PrimaryButton; @class CustomTextView; -@class MFApplePromoView; -@class MFViewController; @interface MVMCoreUICommonViewsUtility : NSObject diff --git a/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.m b/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.m index 6ca89454..1dbe51c1 100644 --- a/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.m +++ b/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.m @@ -10,9 +10,9 @@ #import "PrimaryButton.h" #import "MFTextView.h" #import "MFStyler.h" -#import "UIColor+MVMCoreUIConvenience.h" +#import "UIColor+MFConvenience.h" #import -#import "NSLayoutConstraint+MVMCoreUIConvenience.h" +#import "NSLayoutConstraint+MFConvenience.h" #import "MVMCoreUIUtility.h" #import #import diff --git a/MVMCoreUI/Utility/MVMCoreUIConstants.h b/MVMCoreUI/Utility/MVMCoreUIConstants.h index c467fef7..8df68965 100644 --- a/MVMCoreUI/Utility/MVMCoreUIConstants.h +++ b/MVMCoreUI/Utility/MVMCoreUIConstants.h @@ -11,11 +11,17 @@ #pragma mark - Keys +extern NSString * const KeyScreenHeading; + extern NSString * const KeyDisableButton; extern NSString * const KeyValue; extern NSString * const KeyLabel; extern NSString * const KeyDisable; +extern NSString * const KeyFieldName; + +extern NSString * const KeyHideMainMenu; +extern NSString * const KeyProgressPercent; #pragma mark - Values diff --git a/MVMCoreUI/Utility/MVMCoreUIConstants.m b/MVMCoreUI/Utility/MVMCoreUIConstants.m index ea71a6f5..f0f1a24f 100644 --- a/MVMCoreUI/Utility/MVMCoreUIConstants.m +++ b/MVMCoreUI/Utility/MVMCoreUIConstants.m @@ -10,11 +10,17 @@ #pragma mark - Keys +NSString * const KeyScreenHeading = @"screenHeading"; + NSString * const KeyDisableButton = @"disableAction"; NSString * const KeyValue = @"value"; NSString * const KeyLabel = @"label"; NSString * const KeyDisable = @"disable"; +NSString * const KeyFieldName = @"fieldName"; + +NSString * const KeyHideMainMenu = @"hideMainMenu"; +NSString * const KeyProgressPercent = @"progressPercent"; #pragma mark - Values diff --git a/MVMCoreUI/Utility/Sizing/MFSizeObject.h b/MVMCoreUI/Utility/Sizing/MFSizeObject.h index e4665107..781feb4c 100644 --- a/MVMCoreUI/Utility/Sizing/MFSizeObject.h +++ b/MVMCoreUI/Utility/Sizing/MFSizeObject.h @@ -7,7 +7,7 @@ // #import -#import "MFSizeThreshold.h" +#import extern CGFloat const MFSizeiPhone4HeightThreshold; extern CGFloat const MFSizeiPhone5HeightThreshold; diff --git a/MVMCoreUI/Utility/Sizing/MFSizeObject.m b/MVMCoreUI/Utility/Sizing/MFSizeObject.m index 96c44218..41a9cd27 100644 --- a/MVMCoreUI/Utility/Sizing/MFSizeObject.m +++ b/MVMCoreUI/Utility/Sizing/MFSizeObject.m @@ -6,7 +6,7 @@ // Copyright © 2016 Verizon Wireless. All rights reserved. // -#import "MFSizeObject.h" +#import #import "MVMCoreUISplitViewController.h" #import diff --git a/MVMCoreUI/Utility/Sizing/MFSizeThreshold.m b/MVMCoreUI/Utility/Sizing/MFSizeThreshold.m index 408be4f3..3520e589 100644 --- a/MVMCoreUI/Utility/Sizing/MFSizeThreshold.m +++ b/MVMCoreUI/Utility/Sizing/MFSizeThreshold.m @@ -7,7 +7,7 @@ // #import "MFSizeThreshold.h" -#import "MFSizeObject.h" +#import @implementation MFSizeThreshold