This commit is contained in:
Kevin G Christiano 2020-03-11 13:32:04 -04:00
commit 90d98fdc2e
64 changed files with 643 additions and 319 deletions

View File

@ -114,13 +114,21 @@
52267A0723FFE25000906CBA /* ListOneColumnFullWidthTextAllTextAndLinks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52267A0623FFE25000906CBA /* ListOneColumnFullWidthTextAllTextAndLinks.swift */; }; 52267A0723FFE25000906CBA /* ListOneColumnFullWidthTextAllTextAndLinks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52267A0623FFE25000906CBA /* ListOneColumnFullWidthTextAllTextAndLinks.swift */; };
5248BFEC23F12E350059236A /* ListThreeColumnPlanDataDivider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5248BFEA23F12E350059236A /* ListThreeColumnPlanDataDivider.swift */; }; 5248BFEC23F12E350059236A /* ListThreeColumnPlanDataDivider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5248BFEA23F12E350059236A /* ListThreeColumnPlanDataDivider.swift */; };
5248BFED23F12E350059236A /* ListThreeColumnPlanDataDividerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5248BFEB23F12E350059236A /* ListThreeColumnPlanDataDividerModel.swift */; }; 5248BFED23F12E350059236A /* ListThreeColumnPlanDataDividerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5248BFEB23F12E350059236A /* ListThreeColumnPlanDataDividerModel.swift */; };
525019DD2406430800EED91C /* ListProgressBarDataModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525019DB2406430700EED91C /* ListProgressBarDataModel.swift */; };
525019DE2406430800EED91C /* ListProgressBarData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525019DC2406430800EED91C /* ListProgressBarData.swift */; };
525019E52406852100EED91C /* ListFourColumnDataUsageDividerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525019E42406852100EED91C /* ListFourColumnDataUsageDividerModel.swift */; }; 525019E52406852100EED91C /* ListFourColumnDataUsageDividerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525019E42406852100EED91C /* ListFourColumnDataUsageDividerModel.swift */; };
525019E72406853600EED91C /* ListFourColumnDataUsageDivider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525019E62406853600EED91C /* ListFourColumnDataUsageDivider.swift */; }; 525019E72406853600EED91C /* ListFourColumnDataUsageDivider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525019E62406853600EED91C /* ListFourColumnDataUsageDivider.swift */; };
52B201D224081CFB00D2011E /* ListLeftVariableRadioButtonAndPaymentMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52B201D024081CFB00D2011E /* ListLeftVariableRadioButtonAndPaymentMethod.swift */; }; 52B201D224081CFB00D2011E /* ListLeftVariableRadioButtonAndPaymentMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52B201D024081CFB00D2011E /* ListLeftVariableRadioButtonAndPaymentMethod.swift */; };
52B201D324081CFB00D2011E /* ListLeftVariableRadioButtonAndPaymentMethodModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52B201D124081CFB00D2011E /* ListLeftVariableRadioButtonAndPaymentMethodModel.swift */; }; 52B201D324081CFB00D2011E /* ListLeftVariableRadioButtonAndPaymentMethodModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52B201D124081CFB00D2011E /* ListLeftVariableRadioButtonAndPaymentMethodModel.swift */; };
8D084AD02410BF4800951227 /* ListOneColumnFullWidthTextBodyTextModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D084ACF2410BF4800951227 /* ListOneColumnFullWidthTextBodyTextModel.swift */; };
8D084AD22410BF7600951227 /* ListOneColumnFullWidthTextBodyText.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D084AD12410BF7600951227 /* ListOneColumnFullWidthTextBodyText.swift */; };
8D24041123E7FB9E009E23BE /* ListLeftVariableIconWithRightCaret.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D24041023E7FB9E009E23BE /* ListLeftVariableIconWithRightCaret.swift */; }; 8D24041123E7FB9E009E23BE /* ListLeftVariableIconWithRightCaret.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D24041023E7FB9E009E23BE /* ListLeftVariableIconWithRightCaret.swift */; };
8D24041523E7FC0B009E23BE /* ListLeftVariableIconWithRightCaretModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D24041423E7FC0B009E23BE /* ListLeftVariableIconWithRightCaretModel.swift */; }; 8D24041523E7FC0B009E23BE /* ListLeftVariableIconWithRightCaretModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D24041423E7FC0B009E23BE /* ListLeftVariableIconWithRightCaretModel.swift */; };
8D448E5524050A46006211BB /* ListOneColumnFullWidthTextAllTextAndLinksModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D448E5424050A46006211BB /* ListOneColumnFullWidthTextAllTextAndLinksModel.swift */; }; 8D448E5524050A46006211BB /* ListOneColumnFullWidthTextAllTextAndLinksModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D448E5424050A46006211BB /* ListOneColumnFullWidthTextAllTextAndLinksModel.swift */; };
942C372E241149170066E45E /* NHaasGroteskDSStd-75Bd.otf in Resources */ = {isa = PBXBuildFile; fileRef = 942C372C241149170066E45E /* NHaasGroteskDSStd-75Bd.otf */; };
942C372F241149170066E45E /* NHaasGroteskDSStd-55Rg.otf in Resources */ = {isa = PBXBuildFile; fileRef = 942C372D241149170066E45E /* NHaasGroteskDSStd-55Rg.otf */; };
942C378C2412F4FA0066E45E /* ModalMoleculeListTemplate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 942C378B2412F4FA0066E45E /* ModalMoleculeListTemplate.swift */; };
942C378E2412F5B60066E45E /* ModalMoleculeStackTemplate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 942C378D2412F5B60066E45E /* ModalMoleculeStackTemplate.swift */; };
9432A79F23DB47BA00719041 /* EntryFieldContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9432A79E23DB47BA00719041 /* EntryFieldContainer.swift */; }; 9432A79F23DB47BA00719041 /* EntryFieldContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9432A79E23DB47BA00719041 /* EntryFieldContainer.swift */; };
943784F5236B77BB006A1E82 /* GraphView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 943784F3236B77BB006A1E82 /* GraphView.swift */; }; 943784F5236B77BB006A1E82 /* GraphView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 943784F3236B77BB006A1E82 /* GraphView.swift */; };
943784F6236B77BB006A1E82 /* GraphViewAnimationHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 943784F4236B77BB006A1E82 /* GraphViewAnimationHandler.swift */; }; 943784F6236B77BB006A1E82 /* GraphViewAnimationHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 943784F4236B77BB006A1E82 /* GraphViewAnimationHandler.swift */; };
@ -132,7 +140,6 @@
9455B19C234F8A0400A574DB /* MVMAnimationFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9455B19B234F8A0400A574DB /* MVMAnimationFramework.framework */; }; 9455B19C234F8A0400A574DB /* MVMAnimationFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9455B19B234F8A0400A574DB /* MVMAnimationFramework.framework */; };
9458C3172406C8FD00930963 /* UIFont+FontWrapping.h in Headers */ = {isa = PBXBuildFile; fileRef = 9458C3152406C8FD00930963 /* UIFont+FontWrapping.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9458C3172406C8FD00930963 /* UIFont+FontWrapping.h in Headers */ = {isa = PBXBuildFile; fileRef = 9458C3152406C8FD00930963 /* UIFont+FontWrapping.h */; settings = {ATTRIBUTES = (Public, ); }; };
9458C3182406C8FD00930963 /* UIFont+FontWrapping.m in Sources */ = {isa = PBXBuildFile; fileRef = 9458C3162406C8FD00930963 /* UIFont+FontWrapping.m */; }; 9458C3182406C8FD00930963 /* UIFont+FontWrapping.m in Sources */ = {isa = PBXBuildFile; fileRef = 9458C3162406C8FD00930963 /* UIFont+FontWrapping.m */; };
946EE1BA237B66D80036751F /* MoleculeModelHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 946EE1B9237B66D80036751F /* MoleculeModelHelper.swift */; };
948DB67E2326DCD90011F916 /* MultiProgress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 948DB67D2326DCD90011F916 /* MultiProgress.swift */; }; 948DB67E2326DCD90011F916 /* MultiProgress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 948DB67D2326DCD90011F916 /* MultiProgress.swift */; };
94AF4A3E23E9D13900676048 /* MFCaretButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 94AF4A3C23E9D13900676048 /* MFCaretButton.h */; settings = {ATTRIBUTES = (Public, ); }; }; 94AF4A3E23E9D13900676048 /* MFCaretButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 94AF4A3C23E9D13900676048 /* MFCaretButton.h */; settings = {ATTRIBUTES = (Public, ); }; };
94AF4A3F23E9D13900676048 /* MFCaretButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 94AF4A3D23E9D13900676048 /* MFCaretButton.m */; }; 94AF4A3F23E9D13900676048 /* MFCaretButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 94AF4A3D23E9D13900676048 /* MFCaretButton.m */; };
@ -187,6 +194,7 @@
D22D1F562204CE5D0077CEC0 /* MVMCoreUIStackableViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = D22D1F542204CE5D0077CEC0 /* MVMCoreUIStackableViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; D22D1F562204CE5D0077CEC0 /* MVMCoreUIStackableViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = D22D1F542204CE5D0077CEC0 /* MVMCoreUIStackableViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
D22D1F572204CE5D0077CEC0 /* MVMCoreUIStackableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D22D1F552204CE5D0077CEC0 /* MVMCoreUIStackableViewController.m */; }; D22D1F572204CE5D0077CEC0 /* MVMCoreUIStackableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D22D1F552204CE5D0077CEC0 /* MVMCoreUIStackableViewController.m */; };
D243859923A16B1800332775 /* Container.swift in Sources */ = {isa = PBXBuildFile; fileRef = D243859823A16B1800332775 /* Container.swift */; }; D243859923A16B1800332775 /* Container.swift in Sources */ = {isa = PBXBuildFile; fileRef = D243859823A16B1800332775 /* Container.swift */; };
D256E9932412880000360572 /* Header.swift in Sources */ = {isa = PBXBuildFile; fileRef = D256E9922412880000360572 /* Header.swift */; };
D260105323CEA61600764D80 /* ToggleModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D260105223CEA61600764D80 /* ToggleModel.swift */; }; D260105323CEA61600764D80 /* ToggleModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D260105223CEA61600764D80 /* ToggleModel.swift */; };
D260105523CEA7DC00764D80 /* MVMCoreUISwitch+Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = D260105423CEA7DC00764D80 /* MVMCoreUISwitch+Model.swift */; }; D260105523CEA7DC00764D80 /* MVMCoreUISwitch+Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = D260105423CEA7DC00764D80 /* MVMCoreUISwitch+Model.swift */; };
D260105923D0A92900764D80 /* ContainerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D260105823D0A92900764D80 /* ContainerProtocol.swift */; }; D260105923D0A92900764D80 /* ContainerProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D260105823D0A92900764D80 /* ContainerProtocol.swift */; };
@ -468,14 +476,22 @@
52267A0623FFE25000906CBA /* ListOneColumnFullWidthTextAllTextAndLinks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListOneColumnFullWidthTextAllTextAndLinks.swift; sourceTree = "<group>"; }; 52267A0623FFE25000906CBA /* ListOneColumnFullWidthTextAllTextAndLinks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListOneColumnFullWidthTextAllTextAndLinks.swift; sourceTree = "<group>"; };
5248BFEA23F12E350059236A /* ListThreeColumnPlanDataDivider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListThreeColumnPlanDataDivider.swift; sourceTree = "<group>"; }; 5248BFEA23F12E350059236A /* ListThreeColumnPlanDataDivider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListThreeColumnPlanDataDivider.swift; sourceTree = "<group>"; };
5248BFEB23F12E350059236A /* ListThreeColumnPlanDataDividerModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListThreeColumnPlanDataDividerModel.swift; sourceTree = "<group>"; }; 5248BFEB23F12E350059236A /* ListThreeColumnPlanDataDividerModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListThreeColumnPlanDataDividerModel.swift; sourceTree = "<group>"; };
525019DB2406430700EED91C /* ListProgressBarDataModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListProgressBarDataModel.swift; sourceTree = "<group>"; };
525019DC2406430800EED91C /* ListProgressBarData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListProgressBarData.swift; sourceTree = "<group>"; };
525019E42406852100EED91C /* ListFourColumnDataUsageDividerModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListFourColumnDataUsageDividerModel.swift; sourceTree = "<group>"; }; 525019E42406852100EED91C /* ListFourColumnDataUsageDividerModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListFourColumnDataUsageDividerModel.swift; sourceTree = "<group>"; };
525019E62406853600EED91C /* ListFourColumnDataUsageDivider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListFourColumnDataUsageDivider.swift; sourceTree = "<group>"; }; 525019E62406853600EED91C /* ListFourColumnDataUsageDivider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListFourColumnDataUsageDivider.swift; sourceTree = "<group>"; };
52B201D024081CFB00D2011E /* ListLeftVariableRadioButtonAndPaymentMethod.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListLeftVariableRadioButtonAndPaymentMethod.swift; sourceTree = "<group>"; }; 52B201D024081CFB00D2011E /* ListLeftVariableRadioButtonAndPaymentMethod.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListLeftVariableRadioButtonAndPaymentMethod.swift; sourceTree = "<group>"; };
52B201D124081CFB00D2011E /* ListLeftVariableRadioButtonAndPaymentMethodModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListLeftVariableRadioButtonAndPaymentMethodModel.swift; sourceTree = "<group>"; }; 52B201D124081CFB00D2011E /* ListLeftVariableRadioButtonAndPaymentMethodModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListLeftVariableRadioButtonAndPaymentMethodModel.swift; sourceTree = "<group>"; };
8D084ACF2410BF4800951227 /* ListOneColumnFullWidthTextBodyTextModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListOneColumnFullWidthTextBodyTextModel.swift; sourceTree = "<group>"; };
8D084AD12410BF7600951227 /* ListOneColumnFullWidthTextBodyText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListOneColumnFullWidthTextBodyText.swift; sourceTree = "<group>"; };
8D24041023E7FB9E009E23BE /* ListLeftVariableIconWithRightCaret.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListLeftVariableIconWithRightCaret.swift; sourceTree = "<group>"; }; 8D24041023E7FB9E009E23BE /* ListLeftVariableIconWithRightCaret.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListLeftVariableIconWithRightCaret.swift; sourceTree = "<group>"; };
8D24041423E7FC0B009E23BE /* ListLeftVariableIconWithRightCaretModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListLeftVariableIconWithRightCaretModel.swift; sourceTree = "<group>"; }; 8D24041423E7FC0B009E23BE /* ListLeftVariableIconWithRightCaretModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListLeftVariableIconWithRightCaretModel.swift; sourceTree = "<group>"; };
8D448E5424050A46006211BB /* ListOneColumnFullWidthTextAllTextAndLinksModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListOneColumnFullWidthTextAllTextAndLinksModel.swift; sourceTree = "<group>"; }; 8D448E5424050A46006211BB /* ListOneColumnFullWidthTextAllTextAndLinksModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListOneColumnFullWidthTextAllTextAndLinksModel.swift; sourceTree = "<group>"; };
9402C34F23A2CEA3004B974C /* LeftRightLabelModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LeftRightLabelModel.swift; sourceTree = "<group>"; }; 9402C34F23A2CEA3004B974C /* LeftRightLabelModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LeftRightLabelModel.swift; sourceTree = "<group>"; };
942C372C241149170066E45E /* NHaasGroteskDSStd-75Bd.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NHaasGroteskDSStd-75Bd.otf"; sourceTree = "<group>"; };
942C372D241149170066E45E /* NHaasGroteskDSStd-55Rg.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NHaasGroteskDSStd-55Rg.otf"; sourceTree = "<group>"; };
942C378B2412F4FA0066E45E /* ModalMoleculeListTemplate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalMoleculeListTemplate.swift; sourceTree = "<group>"; };
942C378D2412F5B60066E45E /* ModalMoleculeStackTemplate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalMoleculeStackTemplate.swift; sourceTree = "<group>"; };
9432A79E23DB47BA00719041 /* EntryFieldContainer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EntryFieldContainer.swift; sourceTree = "<group>"; }; 9432A79E23DB47BA00719041 /* EntryFieldContainer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EntryFieldContainer.swift; sourceTree = "<group>"; };
943784F3236B77BB006A1E82 /* GraphView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GraphView.swift; sourceTree = "<group>"; }; 943784F3236B77BB006A1E82 /* GraphView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GraphView.swift; sourceTree = "<group>"; };
943784F4236B77BB006A1E82 /* GraphViewAnimationHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GraphViewAnimationHandler.swift; sourceTree = "<group>"; }; 943784F4236B77BB006A1E82 /* GraphViewAnimationHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GraphViewAnimationHandler.swift; sourceTree = "<group>"; };
@ -487,7 +503,6 @@
9455B19B234F8A0400A574DB /* MVMAnimationFramework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MVMAnimationFramework.framework; path = ../SharedFrameworks/MVMAnimationFramework.framework; sourceTree = "<group>"; }; 9455B19B234F8A0400A574DB /* MVMAnimationFramework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MVMAnimationFramework.framework; path = ../SharedFrameworks/MVMAnimationFramework.framework; sourceTree = "<group>"; };
9458C3152406C8FD00930963 /* UIFont+FontWrapping.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIFont+FontWrapping.h"; sourceTree = "<group>"; }; 9458C3152406C8FD00930963 /* UIFont+FontWrapping.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIFont+FontWrapping.h"; sourceTree = "<group>"; };
9458C3162406C8FD00930963 /* UIFont+FontWrapping.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIFont+FontWrapping.m"; sourceTree = "<group>"; }; 9458C3162406C8FD00930963 /* UIFont+FontWrapping.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIFont+FontWrapping.m"; sourceTree = "<group>"; };
946EE1B9237B66D80036751F /* MoleculeModelHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoleculeModelHelper.swift; sourceTree = "<group>"; };
948DB67D2326DCD90011F916 /* MultiProgress.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MultiProgress.swift; sourceTree = "<group>"; }; 948DB67D2326DCD90011F916 /* MultiProgress.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MultiProgress.swift; sourceTree = "<group>"; };
94AF4A3C23E9D13900676048 /* MFCaretButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MFCaretButton.h; sourceTree = "<group>"; }; 94AF4A3C23E9D13900676048 /* MFCaretButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MFCaretButton.h; sourceTree = "<group>"; };
94AF4A3D23E9D13900676048 /* MFCaretButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MFCaretButton.m; sourceTree = "<group>"; }; 94AF4A3D23E9D13900676048 /* MFCaretButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MFCaretButton.m; sourceTree = "<group>"; };
@ -540,6 +555,7 @@
D22D1F542204CE5D0077CEC0 /* MVMCoreUIStackableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreUIStackableViewController.h; sourceTree = "<group>"; }; D22D1F542204CE5D0077CEC0 /* MVMCoreUIStackableViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreUIStackableViewController.h; sourceTree = "<group>"; };
D22D1F552204CE5D0077CEC0 /* MVMCoreUIStackableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MVMCoreUIStackableViewController.m; sourceTree = "<group>"; }; D22D1F552204CE5D0077CEC0 /* MVMCoreUIStackableViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MVMCoreUIStackableViewController.m; sourceTree = "<group>"; };
D243859823A16B1800332775 /* Container.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Container.swift; sourceTree = "<group>"; }; D243859823A16B1800332775 /* Container.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Container.swift; sourceTree = "<group>"; };
D256E9922412880000360572 /* Header.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Header.swift; sourceTree = "<group>"; };
D260105223CEA61600764D80 /* ToggleModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToggleModel.swift; sourceTree = "<group>"; }; D260105223CEA61600764D80 /* ToggleModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToggleModel.swift; sourceTree = "<group>"; };
D260105423CEA7DC00764D80 /* MVMCoreUISwitch+Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MVMCoreUISwitch+Model.swift"; sourceTree = "<group>"; }; D260105423CEA7DC00764D80 /* MVMCoreUISwitch+Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MVMCoreUISwitch+Model.swift"; sourceTree = "<group>"; };
D260105823D0A92900764D80 /* ContainerProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContainerProtocol.swift; sourceTree = "<group>"; }; D260105823D0A92900764D80 /* ContainerProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContainerProtocol.swift; sourceTree = "<group>"; };
@ -776,7 +792,6 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
011B58EE23A2AA850085F53C /* ModelProtocols */, 011B58EE23A2AA850085F53C /* ModelProtocols */,
946EE1B5237B663A0036751F /* Extensions */,
); );
path = Models; path = Models;
sourceTree = "<group>"; sourceTree = "<group>";
@ -841,6 +856,8 @@
children = ( children = (
8D448E5424050A46006211BB /* ListOneColumnFullWidthTextAllTextAndLinksModel.swift */, 8D448E5424050A46006211BB /* ListOneColumnFullWidthTextAllTextAndLinksModel.swift */,
52267A0623FFE25000906CBA /* ListOneColumnFullWidthTextAllTextAndLinks.swift */, 52267A0623FFE25000906CBA /* ListOneColumnFullWidthTextAllTextAndLinks.swift */,
8D084ACF2410BF4800951227 /* ListOneColumnFullWidthTextBodyTextModel.swift */,
8D084AD12410BF7600951227 /* ListOneColumnFullWidthTextBodyText.swift */,
); );
path = OneColumn; path = OneColumn;
sourceTree = "<group>"; sourceTree = "<group>";
@ -854,12 +871,13 @@
path = FourColumn; path = FourColumn;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
946EE1B5237B663A0036751F /* Extensions */ = { 525239C32407FFCC00454969 /* LockUps */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
946EE1B9237B66D80036751F /* MoleculeModelHelper.swift */, 525019DB2406430700EED91C /* ListProgressBarDataModel.swift */,
525019DC2406430800EED91C /* ListProgressBarData.swift */,
); );
path = Extensions; path = LockUps;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
94C2D9822386F3E30006CF46 /* Label */ = { 94C2D9822386F3E30006CF46 /* Label */ = {
@ -1061,6 +1079,7 @@
D22B38E923F4E07800490EF6 /* DesignedComponents */ = { D22B38E923F4E07800490EF6 /* DesignedComponents */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
525239C32407FFCC00454969 /* LockUps */,
D22B38EC23F4E10700490EF6 /* SectionDividers */, D22B38EC23F4E10700490EF6 /* SectionDividers */,
D22B38EA23F4E08B00490EF6 /* List */, D22B38EA23F4E08B00490EF6 /* List */,
); );
@ -1176,11 +1195,13 @@
012A88AC238C418100FE3DA1 /* TemplateProtocol.swift */, 012A88AC238C418100FE3DA1 /* TemplateProtocol.swift */,
014AA72823C5059B006F3E93 /* StackPageTemplateModel.swift */, 014AA72823C5059B006F3E93 /* StackPageTemplateModel.swift */,
D2A5146022121FBF00345BFB /* MoleculeStackTemplate.swift */, D2A5146022121FBF00345BFB /* MoleculeStackTemplate.swift */,
942C378D2412F5B60066E45E /* ModalMoleculeStackTemplate.swift */,
014AA72923C5059B006F3E93 /* StackCenteredPageTemplateModel.swift */, 014AA72923C5059B006F3E93 /* StackCenteredPageTemplateModel.swift */,
D2A514622213643100345BFB /* MoleculeStackCenteredTemplate.swift */, D2A514622213643100345BFB /* MoleculeStackCenteredTemplate.swift */,
D28A837A23C928DA00DFE4FC /* MoleculeListCellProtocol.swift */, D28A837A23C928DA00DFE4FC /* MoleculeListCellProtocol.swift */,
014AA72C23C5059B006F3E93 /* ListPageTemplateModel.swift */, 014AA72C23C5059B006F3E93 /* ListPageTemplateModel.swift */,
D2E1FAE02268E81D00AEFD8C /* MoleculeListTemplate.swift */, D2E1FAE02268E81D00AEFD8C /* MoleculeListTemplate.swift */,
942C378B2412F4FA0066E45E /* ModalMoleculeListTemplate.swift */,
014AA72A23C5059B006F3E93 /* ThreeLayerPageTemplateModel.swift */, 014AA72A23C5059B006F3E93 /* ThreeLayerPageTemplateModel.swift */,
D2D6CD4122E78FAB00D701B8 /* ThreeLayerTemplate.swift */, D2D6CD4122E78FAB00D701B8 /* ThreeLayerTemplate.swift */,
); );
@ -1215,6 +1236,7 @@
D224798E2316A995003FCCF9 /* HorizontalCombinationViews */, D224798E2316A995003FCCF9 /* HorizontalCombinationViews */,
D224798D2316A988003FCCF9 /* VerticalCombinationViews */, D224798D2316A988003FCCF9 /* VerticalCombinationViews */,
01EB368C23609801006832FA /* HeaderModel.swift */, 01EB368C23609801006832FA /* HeaderModel.swift */,
D256E9922412880000360572 /* Header.swift */,
D2D90B41240463E100DD6EC9 /* MoleculeHeaderModel.swift */, D2D90B41240463E100DD6EC9 /* MoleculeHeaderModel.swift */,
D2A514662213885800345BFB /* MoleculeHeaderView.swift */, D2A514662213885800345BFB /* MoleculeHeaderView.swift */,
012A88EB238F084D00FE3DA1 /* FooterModel.swift */, 012A88EB238F084D00FE3DA1 /* FooterModel.swift */,
@ -1501,6 +1523,8 @@
94CA227924058533002D6750 /* VerizonNHGeDS-Regular.otf */, 94CA227924058533002D6750 /* VerizonNHGeDS-Regular.otf */,
94CA227824058533002D6750 /* VerizonNHGeTX-Bold.otf */, 94CA227824058533002D6750 /* VerizonNHGeTX-Bold.otf */,
94CA227B24058533002D6750 /* VerizonNHGeTX-Regular.otf */, 94CA227B24058533002D6750 /* VerizonNHGeTX-Regular.otf */,
942C372D241149170066E45E /* NHaasGroteskDSStd-55Rg.otf */,
942C372C241149170066E45E /* NHaasGroteskDSStd-75Bd.otf */,
D29DF31721ECECC0003B2FB9 /* OCRAExtended.ttf */, D29DF31721ECECC0003B2FB9 /* OCRAExtended.ttf */,
); );
path = Fonts; path = Fonts;
@ -1712,6 +1736,8 @@
0A21DB86235E06EF00C160A2 /* MFTextField.xib in Resources */, 0A21DB86235E06EF00C160A2 /* MFTextField.xib in Resources */,
94CA227D24058534002D6750 /* VerizonNHGeDS-Regular.otf in Resources */, 94CA227D24058534002D6750 /* VerizonNHGeDS-Regular.otf in Resources */,
D29DF32E21EE8C3D003B2FB9 /* Media.xcassets in Resources */, D29DF32E21EE8C3D003B2FB9 /* Media.xcassets in Resources */,
942C372E241149170066E45E /* NHaasGroteskDSStd-75Bd.otf in Resources */,
942C372F241149170066E45E /* NHaasGroteskDSStd-55Rg.otf in Resources */,
94CA227E24058534002D6750 /* VerizonNHGeDS-Bold.otf in Resources */, 94CA227E24058534002D6750 /* VerizonNHGeDS-Bold.otf in Resources */,
D29DF31B21ECECC0003B2FB9 /* OCRAExtended.ttf in Resources */, D29DF31B21ECECC0003B2FB9 /* OCRAExtended.ttf in Resources */,
); );
@ -1757,6 +1783,7 @@
D2B18B7F2360913400A9AEDC /* Control.swift in Sources */, D2B18B7F2360913400A9AEDC /* Control.swift in Sources */,
0AA33B3A2398524F0067DD0F /* Toggle.swift in Sources */, 0AA33B3A2398524F0067DD0F /* Toggle.swift in Sources */,
D29DF12F21E6851E003B2FB9 /* MVMCoreUITopAlertMainView.m in Sources */, D29DF12F21E6851E003B2FB9 /* MVMCoreUITopAlertMainView.m in Sources */,
942C378C2412F4FA0066E45E /* ModalMoleculeListTemplate.swift in Sources */,
012A88C8238DB02000FE3DA1 /* ModelMoleculeDelegateProtocol.swift in Sources */, 012A88C8238DB02000FE3DA1 /* ModelMoleculeDelegateProtocol.swift in Sources */,
0A7EF86123D8AC2500B2AAD1 /* DigitEntryFieldModel.swift in Sources */, 0A7EF86123D8AC2500B2AAD1 /* DigitEntryFieldModel.swift in Sources */,
DBC4392122491730001AB423 /* LabelWithInternalButton.swift in Sources */, DBC4392122491730001AB423 /* LabelWithInternalButton.swift in Sources */,
@ -1799,6 +1826,7 @@
94C2D9AB23872EB50006CF46 /* LabelAttributeActionModel.swift in Sources */, 94C2D9AB23872EB50006CF46 /* LabelAttributeActionModel.swift in Sources */,
52B201D324081CFB00D2011E /* ListLeftVariableRadioButtonAndPaymentMethodModel.swift in Sources */, 52B201D324081CFB00D2011E /* ListLeftVariableRadioButtonAndPaymentMethodModel.swift in Sources */,
D2E2A99A23D8D6B4000B42E6 /* HeadlineBodyButtonModel.swift in Sources */, D2E2A99A23D8D6B4000B42E6 /* HeadlineBodyButtonModel.swift in Sources */,
8D084AD22410BF7600951227 /* ListOneColumnFullWidthTextBodyText.swift in Sources */,
014AA73123C5059B006F3E93 /* ListPageTemplateModel.swift in Sources */, 014AA73123C5059B006F3E93 /* ListPageTemplateModel.swift in Sources */,
017BEB4023620A230024EF95 /* TextFieldModel.swift in Sources */, 017BEB4023620A230024EF95 /* TextFieldModel.swift in Sources */,
D29DF2A221E7AF4E003B2FB9 /* MVMCoreUIUtility.m in Sources */, D29DF2A221E7AF4E003B2FB9 /* MVMCoreUIUtility.m in Sources */,
@ -1817,6 +1845,7 @@
D213347723843825008E41B3 /* Line.swift in Sources */, D213347723843825008E41B3 /* Line.swift in Sources */,
D28A837723C79FC600DFE4FC /* MFCustomButton+ActionModel.swift in Sources */, D28A837723C79FC600DFE4FC /* MFCustomButton+ActionModel.swift in Sources */,
D2E2A99C23D8D975000B42E6 /* ImageHeadlineBodyModel.swift in Sources */, D2E2A99C23D8D975000B42E6 /* ImageHeadlineBodyModel.swift in Sources */,
525019DE2406430800EED91C /* ListProgressBarData.swift in Sources */,
D28A837F23CCA96400DFE4FC /* TabsModel.swift in Sources */, D28A837F23CCA96400DFE4FC /* TabsModel.swift in Sources */,
012A88EC238F084D00FE3DA1 /* FooterModel.swift in Sources */, 012A88EC238F084D00FE3DA1 /* FooterModel.swift in Sources */,
D2A514672213885800345BFB /* MoleculeHeaderView.swift in Sources */, D2A514672213885800345BFB /* MoleculeHeaderView.swift in Sources */,
@ -1856,6 +1885,7 @@
0A7EF85D23D8A95600B2AAD1 /* TextEntryFieldModel.swift in Sources */, 0A7EF85D23D8A95600B2AAD1 /* TextEntryFieldModel.swift in Sources */,
D2D6CD4222E78FAB00D701B8 /* ThreeLayerTemplate.swift in Sources */, D2D6CD4222E78FAB00D701B8 /* ThreeLayerTemplate.swift in Sources */,
01EB368F23609801006832FA /* LabelModel.swift in Sources */, 01EB368F23609801006832FA /* LabelModel.swift in Sources */,
942C378E2412F5B60066E45E /* ModalMoleculeStackTemplate.swift in Sources */,
0105618F224BBE7700E1557D /* FormValidator+FormParams.swift in Sources */, 0105618F224BBE7700E1557D /* FormValidator+FormParams.swift in Sources */,
01F2A03223A4498200D954D8 /* CaretLinkModel.swift in Sources */, 01F2A03223A4498200D954D8 /* CaretLinkModel.swift in Sources */,
0A7BAFA1232BE61800FB8E22 /* Checkbox.swift in Sources */, 0A7BAFA1232BE61800FB8E22 /* Checkbox.swift in Sources */,
@ -1870,6 +1900,7 @@
D29DF18321E69E54003B2FB9 /* SeparatorView.m in Sources */, D29DF18321E69E54003B2FB9 /* SeparatorView.m in Sources */,
D29DF17A21E69E1F003B2FB9 /* MFCustomButton.m in Sources */, D29DF17A21E69E1F003B2FB9 /* MFCustomButton.m in Sources */,
017BEB7B236763000024EF95 /* LineModel.swift in Sources */, 017BEB7B236763000024EF95 /* LineModel.swift in Sources */,
D256E9932412880000360572 /* Header.swift in Sources */,
94C2D9A523872C350006CF46 /* LabelAttributeFontModel.swift in Sources */, 94C2D9A523872C350006CF46 /* LabelAttributeFontModel.swift in Sources */,
011D95AF2407266E000E3791 /* RadioButtonModel.swift in Sources */, 011D95AF2407266E000E3791 /* RadioButtonModel.swift in Sources */,
017BEB7F23676E870024EF95 /* MoleculeObjectMapping.swift in Sources */, 017BEB7F23676E870024EF95 /* MoleculeObjectMapping.swift in Sources */,
@ -1903,6 +1934,7 @@
D2A638FD22CA98280052ED1F /* HeadlineBody.swift in Sources */, D2A638FD22CA98280052ED1F /* HeadlineBody.swift in Sources */,
D29DF16121E69996003B2FB9 /* MFViewController.m in Sources */, D29DF16121E69996003B2FB9 /* MFViewController.m in Sources */,
522679C223FE886900906CBA /* ListLeftVariableCheckboxAllTextAndLinksModel.swift in Sources */, 522679C223FE886900906CBA /* ListLeftVariableCheckboxAllTextAndLinksModel.swift in Sources */,
8D084AD02410BF4800951227 /* ListOneColumnFullWidthTextBodyTextModel.swift in Sources */,
0ABD1371237DB0450081388D /* ItemDropdownEntryField.swift in Sources */, 0ABD1371237DB0450081388D /* ItemDropdownEntryField.swift in Sources */,
8D24041123E7FB9E009E23BE /* ListLeftVariableIconWithRightCaret.swift in Sources */, 8D24041123E7FB9E009E23BE /* ListLeftVariableIconWithRightCaret.swift in Sources */,
D2E1FAE12268E81D00AEFD8C /* MoleculeListTemplate.swift in Sources */, D2E1FAE12268E81D00AEFD8C /* MoleculeListTemplate.swift in Sources */,
@ -1990,6 +2022,7 @@
D2A514592211C53C00345BFB /* MVMCoreUIMoleculeMappingObject.m in Sources */, D2A514592211C53C00345BFB /* MVMCoreUIMoleculeMappingObject.m in Sources */,
94C661D923CCF4B400D9FE5B /* LeftRightLabelModel.swift in Sources */, 94C661D923CCF4B400D9FE5B /* LeftRightLabelModel.swift in Sources */,
D21EE53C23AD3AD4003D1A30 /* NSLayoutConstraintAxis+Extension.swift in Sources */, D21EE53C23AD3AD4003D1A30 /* NSLayoutConstraintAxis+Extension.swift in Sources */,
525019DD2406430800EED91C /* ListProgressBarDataModel.swift in Sources */,
C6FA7D5223C77A4A00A3614A /* UnOrderedList.swift in Sources */, C6FA7D5223C77A4A00A3614A /* UnOrderedList.swift in Sources */,
01509D8F2327EC6F00EF99AA /* MoleculeTableViewCell.swift in Sources */, 01509D8F2327EC6F00EF99AA /* MoleculeTableViewCell.swift in Sources */,
0105618D224BBE7700E1557D /* FormValidator.swift in Sources */, 0105618D224BBE7700E1557D /* FormValidator.swift in Sources */,
@ -1998,7 +2031,6 @@
D22D1F1B220341F60077CEC0 /* MVMCoreUICheckBox.m in Sources */, D22D1F1B220341F60077CEC0 /* MVMCoreUICheckBox.m in Sources */,
C695A69823C990C200BFB94E /* DoughnutChartView.swift in Sources */, C695A69823C990C200BFB94E /* DoughnutChartView.swift in Sources */,
D29DF2CB21E7BFCC003B2FB9 /* MFSizeThreshold.m in Sources */, D29DF2CB21E7BFCC003B2FB9 /* MFSizeThreshold.m in Sources */,
946EE1BA237B66D80036751F /* MoleculeModelHelper.swift in Sources */,
01509D932327ECFB00EF99AA /* ProgressBar.swift in Sources */, 01509D932327ECFB00EF99AA /* ProgressBar.swift in Sources */,
D260106523D0CEA700764D80 /* StackModel.swift in Sources */, D260106523D0CEA700764D80 /* StackModel.swift in Sources */,
D29770F521F7C6D600B2F0D0 /* TopLabelsAndBottomButtonsViewController.m in Sources */, D29770F521F7C6D600B2F0D0 /* TopLabelsAndBottomButtonsViewController.m in Sources */,

View File

@ -75,7 +75,7 @@ public class ButtonModel: ButtonModelProtocol, MoleculeModelProtocol {
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor) backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
title = try typeContainer.decode(String.self, forKey: .title) title = try typeContainer.decode(String.self, forKey: .title)
action = try typeContainer.decodeModel(codingKey: .action, typeCodingKey: ActionCodingKey.actionType) action = try typeContainer.decodeModel(codingKey: .action)
required = try typeContainer.decodeIfPresent(Bool.self, forKey: .required) required = try typeContainer.decodeIfPresent(Bool.self, forKey: .required)
requiredGroups = try typeContainer.decodeIfPresent([String].self, forKey: .requiredGroups) requiredGroups = try typeContainer.decodeIfPresent([String].self, forKey: .requiredGroups)
if let style = try typeContainer.decodeIfPresent(ButtonStyle.self, forKey: .style) { if let style = try typeContainer.decodeIfPresent(ButtonStyle.self, forKey: .style) {

View File

@ -46,7 +46,7 @@ public class CaretLinkModel: ButtonModelProtocol, MoleculeModelProtocol {
if let enabled = try typeContainer.decodeIfPresent(Bool.self, forKey: .enabled) { if let enabled = try typeContainer.decodeIfPresent(Bool.self, forKey: .enabled) {
self.enabled = enabled self.enabled = enabled
} }
action = try typeContainer.decodeModel(codingKey: .action, typeCodingKey: ActionCodingKey.actionType) action = try typeContainer.decodeModel(codingKey: .action)
} }
public func encode(to encoder: Encoder) throws { public func encode(to encoder: Encoder) throws {

View File

@ -36,6 +36,13 @@ import UIKit
context?.strokePath() context?.strokePath()
} }
open override var intrinsicContentSize: CGSize {
guard let size = titleLabel?.intrinsicContentSize else {
return super.intrinsicContentSize
}
return CGSize(width: size.width, height: size.height + 2)
}
//-------------------------------------------------- //--------------------------------------------------
// MARK: - ModelMoleculeViewProtocol // MARK: - ModelMoleculeViewProtocol
//-------------------------------------------------- //--------------------------------------------------
@ -81,6 +88,7 @@ extension Link {
titleLabel?.lineBreakMode = .byTruncatingTail titleLabel?.lineBreakMode = .byTruncatingTail
titleLabel?.textAlignment = .left titleLabel?.textAlignment = .left
contentHorizontalAlignment = .left contentHorizontalAlignment = .left
contentVerticalAlignment = .top
} }
} }

View File

@ -55,7 +55,7 @@ open class LinkModel: ButtonModelProtocol, MoleculeModelProtocol {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self) let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor) backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
title = try typeContainer.decode(String.self, forKey: .title) title = try typeContainer.decode(String.self, forKey: .title)
action = try typeContainer.decodeModel(codingKey: .action, typeCodingKey: ActionCodingKey.actionType) action = try typeContainer.decodeModel(codingKey: .action)
if let enabled = try typeContainer.decodeIfPresent(Bool.self, forKey: .enabled) { if let enabled = try typeContainer.decodeIfPresent(Bool.self, forKey: .enabled) {
self.enabled = enabled self.enabled = enabled

View File

@ -19,9 +19,8 @@ import MVMCore
public var sizeObject: MFSizeObject? = MFSizeObject(standardSize: Checkbox.defaultHeightWidth, standardiPadPortraitSize: Checkbox.defaultHeightWidth + 6.0) public var sizeObject: MFSizeObject? = MFSizeObject(standardSize: Checkbox.defaultHeightWidth, standardiPadPortraitSize: Checkbox.defaultHeightWidth + 6.0)
// Form Validation // Form Validation
var isRequired = false
var fieldKey: String? var fieldKey: String?
var fieldValue: String? var fieldValue: JSONValue?
var groupName: String? var groupName: String?
var delegateObject: MVMCoreUIDelegateObject? var delegateObject: MVMCoreUIDelegateObject?
@ -398,64 +397,6 @@ import MVMCore
//layoutIfNeeded() //layoutIfNeeded()
} }
public override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
self.delegateObject = delegateObject
FormValidator.setupValidation(molecule: self, delegate: delegateObject?.formValidationProtocol)
guard let dictionary = json else { return }
groupName = dictionary.optionalStringForKey("groupName")
fieldValue = dictionary.optionalStringForKey("value")
if let fieldKey = dictionary[KeyFieldKey] as? String {
self.fieldKey = fieldKey
}
if let isRequired = dictionary[KeyRequired] as? Bool {
self.isRequired = isRequired
}
if let borderColorHex = dictionary["borderColor"] as? String {
layer.borderColor = UIColor.mfGet(forHex: borderColorHex).cgColor
}
if let borderWidth = dictionary["borderWidth"] as? CGFloat {
layer.borderWidth = borderWidth
}
if let checkColorHex = dictionary["checkColor"] as? String {
checkColor = UIColor.mfGet(forHex: checkColorHex)
}
if let isChecked = dictionary["isChecked"] as? Bool, isChecked {
checkAndBypassAnimations(selected: isChecked)
}
if let unCheckedBackgroundColorHex = dictionary["unCheckedBackgroundColor"] as? String {
unCheckedBackgroundColor = UIColor.mfGet(forHex: unCheckedBackgroundColorHex)
}
if let checkedBackgroundColorHex = dictionary["checkedBackgroundColor"] as? String {
checkedBackgroundColor = UIColor.mfGet(forHex: checkedBackgroundColorHex)
}
if let isAnimated = dictionary["isAnimated"] as? Bool {
self.isAnimated = isAnimated
}
if let isRound = dictionary["isRound"] as? Bool {
self.isRound = isRound
}
if let enabled = dictionary["isEnabled"] as? Bool {
isEnabled = enabled
}
if let actionMap = dictionary.optionalDictionaryForKey("action") {
actionBlock = { MVMCoreActionHandler.shared()?.handleAction(with: actionMap, additionalData: additionalData, delegateObject: delegateObject) }
}
}
public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) { public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
super.set(with: model, delegateObject, additionalData) super.set(with: model, delegateObject, additionalData)
@ -465,8 +406,7 @@ import MVMCore
FormValidator.setupValidation(molecule: self, delegate: delegateObject?.formValidationProtocol) FormValidator.setupValidation(molecule: self, delegate: delegateObject?.formValidationProtocol)
groupName = model.groupName groupName = model.groupName
fieldValue = model.value fieldValue = model.fieldValue
isRequired = model.required
if let fieldKey = model.fieldKey { if let fieldKey = model.fieldKey {
self.fieldKey = fieldKey self.fieldKey = fieldKey
@ -509,7 +449,7 @@ extension Checkbox: FormValidationFormFieldProtocol {
} }
public func isValidField() -> Bool { public func isValidField() -> Bool {
return isRequired ? isSelected : true return (fieldKey != nil) ? isSelected : true
} }
public func formFieldName() -> String? { public func formFieldName() -> String? {
@ -517,6 +457,6 @@ extension Checkbox: FormValidationFormFieldProtocol {
} }
public func formFieldValue() -> Any? { public func formFieldValue() -> Any? {
return isSelected ? fieldValue : nil return fieldValue ?? (isSelected ? fieldValue : nil)
} }
} }

View File

@ -17,22 +17,22 @@ import Foundation
public var backgroundColor: Color? public var backgroundColor: Color?
public var groupName: String? public var groupName: String?
public var value: String?
public var fieldKey: String? public var fieldKey: String?
public var required: Bool = false public var fieldValue: JSONValue?
public var borderColor: Color = Color(uiColor: .black)
public var borderWidth: CGFloat = 1
public var isChecked: Bool = false public var isChecked: Bool = false
public var isEnabled: Bool = true
public var isAnimated: Bool = true
public var isRound: Bool = false
public var borderWidth: CGFloat = 1
public var borderColor: Color = Color(uiColor: .black)
public var checkColor: Color = Color(uiColor: .black) public var checkColor: Color = Color(uiColor: .black)
public var unCheckedBackgroundColor: Color = Color(uiColor: .clear) public var unCheckedBackgroundColor: Color = Color(uiColor: .clear)
public var checkedBackgroundColor: Color = Color(uiColor: .clear) public var checkedBackgroundColor: Color = Color(uiColor: .clear)
public var isAnimated: Bool = true
public var isRound: Bool = false
public var isEnabled: Bool = true
public var action: ActionModelProtocol?
public var disabledBackgroundColor: Color = Color(uiColor: .clear) public var disabledBackgroundColor: Color = Color(uiColor: .clear)
public var disabledBorderColor: Color = Color(uiColor: .mvmCoolGray3) public var disabledBorderColor: Color = Color(uiColor: .mvmCoolGray3)
public var disabledCheckColor: Color = Color(uiColor: .mvmCoolGray3) public var disabledCheckColor: Color = Color(uiColor: .mvmCoolGray3)
public var action: ActionModelProtocol?
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Keys // MARK: - Keys
@ -41,21 +41,20 @@ import Foundation
private enum CodingKeys: String, CodingKey { private enum CodingKeys: String, CodingKey {
case moleculeName case moleculeName
case groupName case groupName
case value
case fieldKey case fieldKey
case required case fieldValue
case borderColor case isChecked = "checked"
case isEnabled = "enabled"
case isAnimated = "animated"
case isRound = "round"
case borderWidth case borderWidth
case isChecked case borderColor
case checkColor case checkColor
case unCheckedBackgroundColor case unCheckedBackgroundColor
case checkedBackgroundColor case checkedBackgroundColor
case disabledBackgroundColor case disabledBackgroundColor
case disabledCheckColor case disabledCheckColor
case disabledBorderColor case disabledBorderColor
case isAnimated
case isRound
case isEnabled
case action case action
} }
@ -68,9 +67,8 @@ import Foundation
required public init(from decoder: Decoder) throws { required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self) let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
groupName = try typeContainer.decodeIfPresent(String.self, forKey: .groupName) groupName = try typeContainer.decodeIfPresent(String.self, forKey: .groupName)
value = try typeContainer.decodeIfPresent(String.self, forKey: .value) fieldValue = try typeContainer.decodeIfPresent(JSONValue.self, forKey: .fieldValue)
fieldKey = try typeContainer.decodeIfPresent(String.self, forKey: .fieldKey) fieldKey = try typeContainer.decodeIfPresent(String.self, forKey: .fieldKey)
required = try typeContainer.decodeIfPresent(Bool.self, forKey: .required) ?? false
borderWidth = try typeContainer.decodeIfPresent(CGFloat.self, forKey: .borderWidth) ?? 1 borderWidth = try typeContainer.decodeIfPresent(CGFloat.self, forKey: .borderWidth) ?? 1
borderColor = try typeContainer.decodeIfPresent(Color.self, forKey: .borderColor) ?? Color(uiColor: .black) borderColor = try typeContainer.decodeIfPresent(Color.self, forKey: .borderColor) ?? Color(uiColor: .black)
checkColor = try typeContainer.decodeIfPresent(Color.self, forKey: .checkColor) ?? Color(uiColor: .black) checkColor = try typeContainer.decodeIfPresent(Color.self, forKey: .checkColor) ?? Color(uiColor: .black)
@ -83,16 +81,15 @@ import Foundation
isAnimated = try typeContainer.decodeIfPresent(Bool.self, forKey: .isAnimated) ?? true isAnimated = try typeContainer.decodeIfPresent(Bool.self, forKey: .isAnimated) ?? true
isRound = try typeContainer.decodeIfPresent(Bool.self, forKey: .isRound) ?? false isRound = try typeContainer.decodeIfPresent(Bool.self, forKey: .isRound) ?? false
isEnabled = try typeContainer.decodeIfPresent(Bool.self, forKey: .isEnabled) ?? true isEnabled = try typeContainer.decodeIfPresent(Bool.self, forKey: .isEnabled) ?? true
action = try typeContainer.decodeModelIfPresent(codingKey: .action, typeCodingKey: ActionCodingKey.actionType) action = try typeContainer.decodeModelIfPresent(codingKey: .action)
} }
public func encode(to encoder: Encoder) throws { public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self) var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(moleculeName, forKey: .moleculeName) try container.encode(moleculeName, forKey: .moleculeName)
try container.encodeIfPresent(groupName, forKey: .groupName) try container.encodeIfPresent(groupName, forKey: .groupName)
try container.encodeIfPresent(value, forKey: .value) try container.encodeIfPresent(fieldValue, forKey: .fieldValue)
try container.encodeIfPresent(fieldKey, forKey: .fieldKey) try container.encodeIfPresent(fieldKey, forKey: .fieldKey)
try container.encodeIfPresent(required, forKey: .required)
try container.encodeIfPresent(borderColor, forKey: .borderColor) try container.encodeIfPresent(borderColor, forKey: .borderColor)
try container.encode(borderWidth, forKey: .borderWidth) try container.encode(borderWidth, forKey: .borderWidth)
try container.encode(isChecked, forKey: .isChecked) try container.encode(isChecked, forKey: .isChecked)

View File

@ -25,7 +25,7 @@ open class LabelAttributeActionModel: LabelAttributeModel {
required public init(from decoder: Decoder) throws { required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self) let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
action = try typeContainer.decodeModel(codingKey: .action, typeCodingKey: ActionCodingKey.actionType) action = try typeContainer.decodeModel(codingKey: .action)
try super.init(from: decoder) try super.init(from: decoder)
} }

View File

@ -74,7 +74,7 @@ import Foundation
fontName = try typeContainer.decodeIfPresent(String.self, forKey: .fontName) fontName = try typeContainer.decodeIfPresent(String.self, forKey: .fontName)
fontSize = try typeContainer.decodeIfPresent(CGFloat.self, forKey: .fontSize) fontSize = try typeContainer.decodeIfPresent(CGFloat.self, forKey: .fontSize)
textAlignment = try typeContainer.decodeIfPresent(String.self, forKey: .textAlignment) textAlignment = try typeContainer.decodeIfPresent(String.self, forKey: .textAlignment)
attributes = try typeContainer.decodeModelsIfPresent(codingKey: .attributes, typeCodingKey: AttributeTypeKey.type) as? [LabelAttributeModel] attributes = try typeContainer.decodeModelsIfPresent(codingKey: .attributes)
html = try typeContainer.decodeIfPresent(String.self, forKey: .html) html = try typeContainer.decodeIfPresent(String.self, forKey: .html)
hero = try typeContainer.decodeIfPresent(Int.self, forKey: .hero) hero = try typeContainer.decodeIfPresent(Int.self, forKey: .hero)
makeWholeViewClickable = try typeContainer.decodeIfPresent(Bool.self, forKey: .makeWholeViewClickable) makeWholeViewClickable = try typeContainer.decodeIfPresent(Bool.self, forKey: .makeWholeViewClickable)
@ -91,10 +91,7 @@ import Foundation
try container.encodeIfPresent(fontName, forKey: .fontName) try container.encodeIfPresent(fontName, forKey: .fontName)
try container.encodeIfPresent(fontSize, forKey: .fontSize) try container.encodeIfPresent(fontSize, forKey: .fontSize)
try container.encodeIfPresent(textAlignment, forKey: .textAlignment) try container.encodeIfPresent(textAlignment, forKey: .textAlignment)
var attributeContainer = container.nestedUnkeyedContainer(forKey: .attributes) try container.encodeModelsIfPresent(attributes, forKey: .attributes)
try attributes?.forEach { attributeModel in
try attributeContainer.encode(attributeModel)
}
try container.encodeIfPresent(html, forKey: .html) try container.encodeIfPresent(html, forKey: .html)
try container.encodeIfPresent(hero, forKey: .hero) try container.encodeIfPresent(hero, forKey: .hero)
try container.encodeIfPresent(makeWholeViewClickable, forKey: .makeWholeViewClickable) try container.encodeIfPresent(makeWholeViewClickable, forKey: .makeWholeViewClickable)

View File

@ -81,7 +81,7 @@ public typealias CoreObjectActionLoadPresentDelegate = MVMCoreActionDelegateProt
return NSRange(location: 0, length: frontText?.count ?? 0) return NSRange(location: 0, length: frontText?.count ?? 0)
} }
private var actionRange: NSRange { public var actionRange: NSRange {
return NSRange(location: frontText?.count ?? 0, length: actionText?.count ?? 0) return NSRange(location: frontText?.count ?? 0, length: actionText?.count ?? 0)
} }

View File

@ -8,14 +8,22 @@
import UIKit import UIKit
@objcMembers public class LeftRightLabelModel: MoleculeModelProtocol { @objcMembers open class LeftRightLabelModel: MoleculeModelProtocol {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------
public static var identifier: String = "leftRightLabelView" public static var identifier: String = "leftRightLabelView"
public var moleculeName: String? = LeftRightLabelModel.identifier public var moleculeName: String? = LeftRightLabelModel.identifier
public var backgroundColor: Color? public var backgroundColor: Color?
public var leftText: LabelModel public var leftText: LabelModel
public var rightText: LabelModel? public var rightText: LabelModel?
init(_ leftText: LabelModel) { //--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(_ leftText: LabelModel) {
self.leftText = leftText self.leftText = leftText
} }
} }

View File

@ -13,5 +13,39 @@ public class RadioButtonModel: MoleculeModelProtocol {
public static var identifier: String = "radioButton" public static var identifier: String = "radioButton"
public var backgroundColor: Color? public var backgroundColor: Color?
public var state: Bool = false public var state: Bool = false
public var enabled: Bool = true
public var fieldKey: String? public var fieldKey: String?
private enum CodingKeys: String, CodingKey {
case moleculeName
case backgroundColor
case state
case enabled
case fieldKey
}
public init(_ state: Bool) {
self.state = state
}
required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
if let state = try typeContainer.decodeIfPresent(Bool.self, forKey: .state) {
self.state = state
}
if let enabled = try typeContainer.decodeIfPresent(Bool.self, forKey: .enabled) {
self.enabled = enabled
}
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
fieldKey = try typeContainer.decodeIfPresent(String.self, forKey: .fieldKey)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
try container.encode(moleculeName, forKey: .moleculeName)
try container.encode(state, forKey: .state)
try container.encode(enabled, forKey: .enabled)
try container.encodeIfPresent(fieldKey, forKey: .fieldKey)
}
} }

View File

@ -36,8 +36,8 @@ public class ToggleModel: MoleculeModelProtocol {
if let state = try typeContainer.decodeIfPresent(Bool.self, forKey: .state) { if let state = try typeContainer.decodeIfPresent(Bool.self, forKey: .state) {
self.state = state self.state = state
} }
action = try typeContainer.decodeModelIfPresent(codingKey: .action, typeCodingKey: ActionCodingKey.actionType) action = try typeContainer.decodeModelIfPresent(codingKey: .action)
alternateAction = try typeContainer.decodeModelIfPresent(codingKey: .alternateAction, typeCodingKey: ActionCodingKey.actionType) alternateAction = try typeContainer.decodeModelIfPresent(codingKey: .alternateAction)
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor) backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
required = try typeContainer.decodeIfPresent(Bool.self, forKey: .required) required = try typeContainer.decodeIfPresent(Bool.self, forKey: .required)
fieldKey = try typeContainer.decodeIfPresent(String.self, forKey: .fieldKey) fieldKey = try typeContainer.decodeIfPresent(String.self, forKey: .fieldKey)
@ -49,7 +49,7 @@ public class ToggleModel: MoleculeModelProtocol {
try container.encodeModelIfPresent(action, forKey: .action) try container.encodeModelIfPresent(action, forKey: .action)
try container.encodeModelIfPresent(alternateAction, forKey: .alternateAction) try container.encodeModelIfPresent(alternateAction, forKey: .alternateAction)
try container.encode(moleculeName, forKey: .moleculeName) try container.encode(moleculeName, forKey: .moleculeName)
try container.encodeIfPresent(state, forKey: .state) try container.encode(state, forKey: .state)
try container.encodeIfPresent(required, forKey: .required) try container.encodeIfPresent(required, forKey: .required)
try container.encodeIfPresent(fieldKey, forKey: .fieldKey) try container.encodeIfPresent(fieldKey, forKey: .fieldKey)
} }

View File

@ -96,8 +96,8 @@ import UIKit
super.layoutSubviews() super.layoutSubviews()
// Ensures accessory view aligns to the center y derived from the // Ensures accessory view aligns to the center y derived from the
if let center = heroAccessoryCenter { if let _ = heroAccessoryCenter {
accessoryView?.center.y = center.y alignAccessoryToHero()
} }
} }
@ -120,7 +120,7 @@ import UIKit
} }
// MARK: - MFViewProtocol // MARK: - MFViewProtocol
public func updateView(_ size: CGFloat) { open func updateView(_ size: CGFloat) {
containerHelper.updateViewMargins(self, model: listItemModel, size: size) containerHelper.updateViewMargins(self, model: listItemModel, size: size)
if accessoryView != nil { if accessoryView != nil {
@ -151,7 +151,7 @@ import UIKit
} }
//TODO: ModelProtocol, Change to model //TODO: ModelProtocol, Change to model
public func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) { open func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
guard let model = model as? ListItemModelProtocol else { return } guard let model = model as? ListItemModelProtocol else { return }
self.listItemModel = model self.listItemModel = model
@ -176,6 +176,9 @@ import UIKit
let backgroundColor = moleculeModel.backgroundColor { let backgroundColor = moleculeModel.backgroundColor {
self.backgroundColor = backgroundColor.uiColor self.backgroundColor = backgroundColor.uiColor
} }
// align if needed.
containerHelper.set(with: model, for: molecule as? MVMCoreUIViewConstrainingProtocol)
} }
open func reset() { open func reset() {
@ -183,11 +186,11 @@ import UIKit
backgroundColor = .white backgroundColor = .white
} }
public class func nameForReuse(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> String? { open class func nameForReuse(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
return model.moleculeName return model.moleculeName
} }
public class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? { open class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
return nil return nil
} }

View File

@ -31,9 +31,10 @@ extension MFViewController: MoleculeDelegateProtocol {
return nil return nil
} }
@objc public func moleculeLayoutUpdated(_ molecule: UIView & MVMCoreUIMoleculeViewProtocol) { } // These are required because swift will call the extension function otherwise.
@objc public func moleculeLayoutUpdated(_ molecule: UIView & MVMCoreUIMoleculeViewProtocol) {}
@objc public func addMolecules(_ molecules: [[AnyHashable: Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) { } @objc public func addMolecules(_ molecules: [[AnyHashable: Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) {}
@objc public func addMolecules(_ molecules: [[AnyHashable : Any]], indexPath: IndexPath, animation: UITableView.RowAnimation) {}
@objc public func removeMolecules(_ molecules: [[AnyHashable: Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) { } @objc public func removeMolecules(_ molecules: [[AnyHashable: Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) {}
} }

View File

@ -10,48 +10,48 @@ import Foundation
public extension NSLayoutConstraint { public extension NSLayoutConstraint {
/// Pins the views vertically in the super view, allowing the super to expand depending on the tallest view. Shorter views are aligned center. /// Pins the views vertically to the top and bottom anchor, allowing the super to expand depending on the tallest view. Shorter views are aligned center.
static func pinViewsVerticalExpandableAlignCenter(_ views: [UIView]) { static func pinViewsVerticalExpandableAlignCenter(_ views: [UIView], topAnchor: NSLayoutYAxisAnchor? = nil, bottomAnchor: NSLayoutYAxisAnchor? = nil, constant: CGFloat = 0) {
for view in views { for view in views {
guard let superView = view.superview else { guard let superView = view.superview else { return }
return let top = topAnchor ?? superView.layoutMarginsGuide.topAnchor
} let bottom = bottomAnchor ?? superView.layoutMarginsGuide.bottomAnchor
view.centerYAnchor.constraint(equalTo: superView.centerYAnchor).isActive = true view.centerYAnchor.constraint(equalTo: superView.centerYAnchor).isActive = true
view.topAnchor.constraint(greaterThanOrEqualTo: superView.layoutMarginsGuide.topAnchor).isActive = true view.topAnchor.constraint(greaterThanOrEqualTo: top).isActive = true
superView.layoutMarginsGuide.bottomAnchor.constraint(greaterThanOrEqualTo: view.bottomAnchor).isActive = true bottom.constraint(greaterThanOrEqualTo: view.bottomAnchor).isActive = true
var constraint = view.topAnchor.constraint(equalTo: superView.layoutMarginsGuide.topAnchor) var constraint = view.topAnchor.constraint(equalTo: top)
constraint.priority = .defaultLow constraint.priority = .defaultLow
constraint.isActive = true constraint.isActive = true
constraint = superView.layoutMarginsGuide.bottomAnchor.constraint(equalTo: view.bottomAnchor) constraint = bottom.constraint(equalTo: view.bottomAnchor)
constraint.priority = .defaultLow constraint.priority = .defaultLow
constraint.isActive = true constraint.isActive = true
} }
} }
/// Pins the views vertically in the super view, allowing the super to expand depending on the tallest view. Shorter views are aligned top. /// Pins the views vertically to the top and bottom anchor, allowing the super to expand depending on the tallest view. Shorter views are aligned top.
static func pinViewsVerticalExpandableAlignTop(_ views: [UIView]) { static func pinViewsVerticalExpandableAlignTop(_ views: [UIView], topAnchor: NSLayoutYAxisAnchor? = nil, bottomAnchor: NSLayoutYAxisAnchor? = nil, constant: CGFloat = 0) {
for view in views { for view in views {
guard let superView = view.superview else { guard let superView = view.superview else { return }
return let top = topAnchor ?? superView.layoutMarginsGuide.topAnchor
} let bottom = bottomAnchor ?? superView.layoutMarginsGuide.bottomAnchor
view.topAnchor.constraint(equalTo: superView.layoutMarginsGuide.topAnchor).isActive = true view.topAnchor.constraint(equalTo: top).isActive = true
superView.layoutMarginsGuide.bottomAnchor.constraint(greaterThanOrEqualTo: view.bottomAnchor).isActive = true bottom.constraint(greaterThanOrEqualTo: view.bottomAnchor, constant: constant).isActive = true
let constraint = superView.layoutMarginsGuide.bottomAnchor.constraint(equalTo: view.bottomAnchor) let constraint = bottom.constraint(equalTo: view.bottomAnchor)
constraint.priority = .defaultLow constraint.priority = .defaultLow
constraint.isActive = true constraint.isActive = true
} }
} }
/// Pins a view to the left and a view to the right, flexible space in between. The super can expand depending on the taller view. Shorter views are aligned top if alignTop true, else aligned center. /// Pins a view to the left and a view to the right, flexible space in between. The super can expand depending on the taller view. Shorter views are aligned top if alignTop true, else aligned center.
static func pinViews(leftView: UIView, rightView: UIView, alignTop: Bool) { static func pinViews(leftView: UIView, rightView: UIView, alignTop: Bool, topAnchor: NSLayoutYAxisAnchor? = nil, bottomAnchor: NSLayoutYAxisAnchor? = nil, constant: CGFloat = 0) {
guard let superView = leftView.superview else { return } guard let superView = leftView.superview else { return }
if alignTop { if alignTop {
pinViewsVerticalExpandableAlignTop([leftView, rightView]) pinViewsVerticalExpandableAlignTop([leftView, rightView], topAnchor: topAnchor, bottomAnchor: bottomAnchor, constant: constant)
} else { } else {
pinViewsVerticalExpandableAlignCenter([leftView, rightView]) pinViewsVerticalExpandableAlignCenter([leftView, rightView], topAnchor: topAnchor, bottomAnchor: bottomAnchor, constant: constant)
} }
leftView.leadingAnchor.constraint(equalTo: superView.layoutMarginsGuide.leadingAnchor).isActive = true leftView.leadingAnchor.constraint(equalTo: superView.layoutMarginsGuide.leadingAnchor).isActive = true
superView.layoutMarginsGuide.trailingAnchor.constraint(equalTo: rightView.trailingAnchor).isActive = true superView.layoutMarginsGuide.trailingAnchor.constraint(equalTo: rightView.trailingAnchor).isActive = true

View File

@ -50,11 +50,14 @@ typedef NS_ENUM(NSInteger, MFNumberOfDrawers) {
// Convenience getter // Convenience getter
+ (nullable instancetype)mainSplitViewController; + (nullable instancetype)mainSplitViewController;
/// Initializes the splitviewcontroller with the passed in panels.
- (nullable instancetype)initWithLeftPanel:(nullable UIViewController <MVMCoreUIPanelProtocol> *)leftPanel rightPanel:(nullable UIViewController <MVMCoreUIPanelProtocol> *)rightPanel;
// Returns a split controller with the mvm styling. Also sets the appropriate handlers. // Returns a split controller with the mvm styling. Also sets the appropriate handlers.
+ (nullable instancetype)setup; + (nullable instancetype)setup:(nullable UIViewController <MVMCoreUIPanelProtocol> *)leftPanel rightPanel:(nullable UIViewController <MVMCoreUIPanelProtocol> *)rightPanel;
// Returns a split controller with the mvm styling. Also sets the appropriate handlers. Also sets up the default load screen // Returns a split controller with the mvm styling. Also sets the appropriate handlers. Also sets up the default load screen
+ (nullable instancetype)setupAsMainController; + (nullable instancetype)setupAsMainController:(nullable UIViewController <MVMCoreUIPanelProtocol> *)leftPanel rightPanel:(nullable UIViewController <MVMCoreUIPanelProtocol> *)rightPanel;
#pragma mark - Panel Functions #pragma mark - Panel Functions
@ -83,9 +86,6 @@ typedef NS_ENUM(NSInteger, MFNumberOfDrawers) {
// contains speicaly logic to set the icon color // contains speicaly logic to set the icon color
- (void)setNavigationIconColor:(nullable UIColor *)color; - (void)setNavigationIconColor:(nullable UIColor *)color;
///create right and left panel. if left and right panel is already created, will replace them
- (void)createPanels;
/// Updates the panels that are used. /// Updates the panels that are used.
- (void)setupPanels; - (void)setupPanels;
@ -123,10 +123,6 @@ typedef NS_ENUM(NSInteger, MFNumberOfDrawers) {
// Can subclass to set threshold for when the drawers are permanently extended. Default is 1000 for the left panel and 2000 for both. // Can subclass to set threshold for when the drawers are permanently extended. Default is 1000 for the left panel and 2000 for both.
- (MFNumberOfDrawers)numberOfDrawersShouldShow:(nullable NSNumber *)forWidth; - (MFNumberOfDrawers)numberOfDrawersShouldShow:(nullable NSNumber *)forWidth;
// subclass to return default global panels. kept alive after creation.
- (nullable UIViewController <MVMCoreUIPanelProtocol> *)createLeftPanelViewController;
- (nullable UIViewController <MVMCoreUIPanelProtocol> *)createRightPanelViewController;
// subclass to change image of back button // subclass to change image of back button
- (nullable UIImage *)imageForBackButton; - (nullable UIImage *)imageForBackButton;

View File

@ -76,18 +76,26 @@ CGFloat const PanelAnimationDuration = 0.2;
return [MVMCoreActionUtility initializerClassCheck:[MVMCoreUISession sharedGlobal].splitViewController classToVerify:self]; return [MVMCoreActionUtility initializerClassCheck:[MVMCoreUISession sharedGlobal].splitViewController classToVerify:self];
} }
+ (nullable instancetype)setup { + (nullable instancetype)setup:(nullable UIViewController <MVMCoreUIPanelProtocol> *)leftPanel rightPanel:(nullable UIViewController <MVMCoreUIPanelProtocol> *)rightPanel {
MVMCoreUISplitViewController *splitViewController = [[self alloc] init]; MVMCoreUISplitViewController *splitViewController = [[self alloc] initWithLeftPanel:leftPanel rightPanel:rightPanel];
[MVMCoreUISession sharedGlobal].splitViewController = splitViewController; [MVMCoreUISession sharedGlobal].splitViewController = splitViewController;
return splitViewController; return splitViewController;
} }
+ (nullable instancetype)setupAsMainController { + (nullable instancetype)setupAsMainController:(nullable UIViewController <MVMCoreUIPanelProtocol> *)leftPanel rightPanel:(nullable UIViewController <MVMCoreUIPanelProtocol> *)rightPanel {
MVMCoreUISplitViewController *splitViewController = [self setup]; MVMCoreUISplitViewController *splitViewController = [self setup:leftPanel rightPanel:rightPanel];
[[MVMCoreUISession sharedGlobal] setupAsStandardLoadViewDelegate:splitViewController]; [[MVMCoreUISession sharedGlobal] setupAsStandardLoadViewDelegate:splitViewController];
return splitViewController; return splitViewController;
} }
- (nullable instancetype)initWithLeftPanel:(nullable UIViewController <MVMCoreUIPanelProtocol> *)leftPanel rightPanel:(nullable UIViewController <MVMCoreUIPanelProtocol> *)rightPanel {
if (self = [super init]) {
self.globalLeftPanel = leftPanel;
self.globalRightPanel = rightPanel;
}
return self;
}
#pragma mark - Main Subclassables #pragma mark - Main Subclassables
- (MFNumberOfDrawers)numberOfDrawersShouldShow:(NSNumber *)forWidth { - (MFNumberOfDrawers)numberOfDrawersShouldShow:(NSNumber *)forWidth {
@ -100,14 +108,6 @@ CGFloat const PanelAnimationDuration = 0.2;
return (width > 2000 ? MFTwoDrawer : (width > 1000 ? MFOneDrawer : MFNoDrawer)); return (width > 2000 ? MFTwoDrawer : (width > 1000 ? MFOneDrawer : MFNoDrawer));
} }
- (nullable UIViewController <MVMCoreUIPanelProtocol> *)createLeftPanelViewController {
return nil;
}
- (nullable UIViewController <MVMCoreUIPanelProtocol> *)createRightPanelViewController {
return nil;
}
- (nullable NSArray <UIBarButtonItem *>*)additionalLeftButtons { - (nullable NSArray <UIBarButtonItem *>*)additionalLeftButtons {
return nil; return nil;
} }
@ -766,13 +766,6 @@ CGFloat const PanelAnimationDuration = 0.2;
} }
} }
- (void)createPanels {
// Create panels
self.globalLeftPanel = [self createLeftPanelViewController];
self.globalRightPanel = [self createRightPanelViewController];
[self setupPanels];
}
- (void)setupPanels { - (void)setupPanels {
[self forceHideBothDrawers]; [self forceHideBothDrawers];
[self setupLeftPanel]; [self setupLeftPanel];
@ -869,7 +862,7 @@ CGFloat const PanelAnimationDuration = 0.2;
[NSLayoutConstraint constraintWithItem:coverView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:mainView attribute:NSLayoutAttributeTop multiplier:1.0 constant:0].active = YES; [NSLayoutConstraint constraintWithItem:coverView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:mainView attribute:NSLayoutAttributeTop multiplier:1.0 constant:0].active = YES;
[NSLayoutConstraint constraintWithItem:coverView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:mainView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0].active = YES; [NSLayoutConstraint constraintWithItem:coverView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:mainView attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0].active = YES;
[self createPanels]; [self setupPanels];
} }
- (void)viewDidLoad { - (void)viewDidLoad {

View File

@ -23,15 +23,15 @@ open class Container: View, ContainerProtocol {
} }
// MARK:- ContainerProtocol // MARK:- ContainerProtocol
public func alignHorizontal(_ alignment: UIStackView.Alignment) { open func alignHorizontal(_ alignment: UIStackView.Alignment) {
containerHelper.alignHorizontal(alignment) containerHelper.alignHorizontal(alignment)
} }
public func alignVertical(_ alignment: UIStackView.Alignment) { open func alignVertical(_ alignment: UIStackView.Alignment) {
containerHelper.alignVertical(alignment) containerHelper.alignVertical(alignment)
} }
public func constrainView(_ view: UIView) { open func constrainView(_ view: UIView) {
containerHelper.constrainView(view) containerHelper.constrainView(view)
} }
} }

View File

@ -9,7 +9,7 @@
import Foundation import Foundation
public class ContainerHelper: NSObject { open class ContainerHelper: NSObject {
var leftConstraint: NSLayoutConstraint? var leftConstraint: NSLayoutConstraint?
var topConstraint: NSLayoutConstraint? var topConstraint: NSLayoutConstraint?
var bottomConstraint: NSLayoutConstraint? var bottomConstraint: NSLayoutConstraint?
@ -28,7 +28,7 @@ public class ContainerHelper: NSObject {
var bottomLowConstraint: NSLayoutConstraint? var bottomLowConstraint: NSLayoutConstraint?
var rightLowConstraint: NSLayoutConstraint? var rightLowConstraint: NSLayoutConstraint?
func constrainView(_ view: UIView) { open func constrainView(_ view: UIView) {
guard let margins = view.superview?.layoutMarginsGuide else { return } guard let margins = view.superview?.layoutMarginsGuide else { return }
leftConstraint = view.leftAnchor.constraint(equalTo: margins.leftAnchor) leftConstraint = view.leftAnchor.constraint(equalTo: margins.leftAnchor)
leftConstraint?.isActive = true leftConstraint?.isActive = true
@ -69,7 +69,7 @@ public class ContainerHelper: NSObject {
setAccessibility(view) setAccessibility(view)
} }
func setAccessibility(_ view: UIView) { open func setAccessibility(_ view: UIView) {
guard let superView = view.superview else { return } guard let superView = view.superview else { return }
superView.isAccessibilityElement = false superView.isAccessibilityElement = false
if let elements = view.accessibilityElements { if let elements = view.accessibilityElements {
@ -79,7 +79,7 @@ public class ContainerHelper: NSObject {
} }
} }
func alignHorizontal(_ alignment: UIStackView.Alignment) { open func alignHorizontal(_ alignment: UIStackView.Alignment) {
switch alignment { switch alignment {
case .center: case .center:
alignCenterHorizontalConstraint?.isActive = true alignCenterHorizontalConstraint?.isActive = true
@ -109,7 +109,7 @@ public class ContainerHelper: NSObject {
} }
} }
func alignVertical(_ alignment: UIStackView.Alignment) { open func alignVertical(_ alignment: UIStackView.Alignment) {
switch alignment { switch alignment {
case .center: case .center:
alignCenterVerticalConstraint?.isActive = true alignCenterVerticalConstraint?.isActive = true
@ -139,7 +139,7 @@ public class ContainerHelper: NSObject {
} }
} }
static func getAlignment(for string: String) -> UIStackView.Alignment? { public static func getAlignment(for string: String) -> UIStackView.Alignment? {
switch string { switch string {
case "leading": case "leading":
return .leading return .leading
@ -154,7 +154,7 @@ public class ContainerHelper: NSObject {
} }
} }
static func getAlignmentString(for alignment: UIStackView.Alignment?) -> String? { public static func getAlignmentString(for alignment: UIStackView.Alignment?) -> String? {
switch alignment { switch alignment {
case .leading: case .leading:
return "leading" return "leading"
@ -169,11 +169,11 @@ public class ContainerHelper: NSObject {
} }
} }
func updateViewMargins(_ view: UIView, model: ContainerModelProtocol?, size: CGFloat) { open func updateViewMargins(_ view: UIView, model: ContainerModelProtocol?, size: CGFloat) {
MFStyler.setMarginsFor(view, size: size, defaultHorizontal: model?.useHorizontalMargins ?? false, top: (model?.useVerticalMargins ?? false) ? (model?.topMarginPadding ?? 0) : 0, bottom: (model?.useVerticalMargins ?? false) ? (model?.bottomMarginPadding ?? 0) : 0) MFStyler.setMarginsFor(view, size: size, defaultHorizontal: model?.useHorizontalMargins ?? false, top: (model?.useVerticalMargins ?? false) ? (model?.topMarginPadding ?? 0) : 0, bottom: (model?.useVerticalMargins ?? false) ? (model?.bottomMarginPadding ?? 0) : 0)
} }
func set(with model: ContainerModelProtocol, for contained: MVMCoreUIViewConstrainingProtocol?) { open func set(with model: ContainerModelProtocol, for contained: MVMCoreUIViewConstrainingProtocol?) {
if let horizontalAlignment = model.horizontalAlignment ?? contained?.horizontalAlignment?() { if let horizontalAlignment = model.horizontalAlignment ?? contained?.horizontalAlignment?() {
alignHorizontal(horizontalAlignment) alignHorizontal(horizontalAlignment)
} }
@ -182,7 +182,7 @@ public class ContainerHelper: NSObject {
} }
} }
func set(with JSON: [AnyHashable: Any]?, for contained: UIView) { open func set(with JSON: [AnyHashable: Any]?, for contained: UIView) {
if let horizontalAlignmentString = JSON?.optionalStringForKey("horizontalAlignment"), let alignment = ContainerHelper.getAlignment(for: horizontalAlignmentString) ?? (contained as? MVMCoreUIViewConstrainingProtocol)?.horizontalAlignment?() { if let horizontalAlignmentString = JSON?.optionalStringForKey("horizontalAlignment"), let alignment = ContainerHelper.getAlignment(for: horizontalAlignmentString) ?? (contained as? MVMCoreUIViewConstrainingProtocol)?.horizontalAlignment?() {
alignHorizontal(alignment) alignHorizontal(alignment)
} else if let alignment = (contained as? MVMCoreUIViewConstrainingProtocol)?.horizontalAlignment?() { } else if let alignment = (contained as? MVMCoreUIViewConstrainingProtocol)?.horizontalAlignment?() {

View File

@ -8,7 +8,7 @@
import Foundation import Foundation
public class ContainerModel: ContainerModelProtocol, Codable { open class ContainerModel: ContainerModelProtocol, Codable {
public var horizontalAlignment: UIStackView.Alignment? public var horizontalAlignment: UIStackView.Alignment?
public var verticalAlignment: UIStackView.Alignment? public var verticalAlignment: UIStackView.Alignment?
public var useHorizontalMargins: Bool? public var useHorizontalMargins: Bool?
@ -48,7 +48,7 @@ public class ContainerModel: ContainerModelProtocol, Codable {
bottomMarginPadding = try typeContainer.decodeIfPresent(CGFloat.self, forKey: .bottomMarginPadding) bottomMarginPadding = try typeContainer.decodeIfPresent(CGFloat.self, forKey: .bottomMarginPadding)
} }
public func encode(to encoder: Encoder) throws { open func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self) var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(ContainerHelper.getAlignmentString(for: verticalAlignment), forKey: .verticalAlignment) try container.encodeIfPresent(ContainerHelper.getAlignmentString(for: verticalAlignment), forKey: .verticalAlignment)
try container.encodeIfPresent(ContainerHelper.getAlignmentString(for: horizontalAlignment), forKey: .horizontalAlignment) try container.encodeIfPresent(ContainerHelper.getAlignmentString(for: horizontalAlignment), forKey: .horizontalAlignment)

View File

@ -30,7 +30,7 @@ public class MoleculeContainerModel: ContainerModel, MoleculeContainerModelProto
required public init(from decoder: Decoder) throws { required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self) let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
molecule = try typeContainer.decodeMolecule(codingKey: .molecule) molecule = try typeContainer.decodeModel(codingKey: .molecule)
try super.init(from: decoder) try super.init(from: decoder)
} }

View File

@ -23,6 +23,7 @@
@property (nullable, weak, nonatomic) UIView *containerView; @property (nullable, weak, nonatomic) UIView *containerView;
@property (nullable, weak, nonatomic) UIView *indicatorRectangle; @property (nullable, weak, nonatomic) UIView *indicatorRectangle;
@property (nullable, copy, nonatomic) PagingTouchBlock pagingTouchBlock; @property (nullable, copy, nonatomic) PagingTouchBlock pagingTouchBlock;
@property (nullable, strong, nonatomic) UITapGestureRecognizer *tapGestureRecognizer;
///set YES to make the accessibility value as "Slide #currentPage of #totalPage", otherwise will be "Page #currentPage of #totalPage", default is NO ///set YES to make the accessibility value as "Slide #currentPage of #totalPage", otherwise will be "Page #currentPage of #totalPage", default is NO
@property (nonatomic) BOOL isSlidesAcc; @property (nonatomic) BOOL isSlidesAcc;

View File

@ -267,6 +267,7 @@ static CGFloat const IndicatorRectangleHeight = 4;
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] init]; UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] init];
[tapGesture addTarget:self action:@selector(rectangleTapped:)]; [tapGesture addTarget:self action:@selector(rectangleTapped:)];
[self addGestureRecognizer:tapGesture]; [self addGestureRecognizer:tapGesture];
self.tapGestureRecognizer = tapGesture;
} }
} }

View File

@ -1,53 +0,0 @@
//
// MoleculeModelHelper.swift
// MVMCoreUI
//
// Created by Ryan on 11/12/19.
// Copyright © 2019 Verizon Wireless. All rights reserved.
//
import Foundation
extension KeyedDecodingContainer where Key: CodingKey {
private enum TypeCodingKey: String, CodingKey {
case moleculeName
}
/// Decodes the molecule model with the given coding key based on moleculeName
public func decodeMolecule(codingKey: KeyedDecodingContainer<K>.Key) throws -> MoleculeModelProtocol {
return try decodeModel(codingKey: codingKey, typeCodingKey: TypeCodingKey.moleculeName)
}
/// Decodes the molecule model with the given coding key based on moleculeName, optional
public func decodeMoleculeIfPresent(codingKey: KeyedDecodingContainer<K>.Key) throws -> MoleculeModelProtocol? {
return try decodeModelIfPresent(codingKey: codingKey, typeCodingKey: TypeCodingKey.moleculeName)
}
/// Decodes the list of molecule models with the given coding key based on moleculeName
public func decodeMolecules(codingKey: KeyedDecodingContainer<K>.Key) throws -> [MoleculeModelProtocol] {
guard let models = try decodeModels(codingKey: codingKey, typeCodingKey: TypeCodingKey.moleculeName) as? [MoleculeModelProtocol] else {
throw ModelRegistry.Error.decoderError
}
return models
}
/// Decodes the list of molecule models with the given coding key based on moleculeName, optional
public func decodeMoleculesIfPresent(codingKey: KeyedDecodingContainer<K>.Key) throws -> [MoleculeModelProtocol]? {
return try decodeModelsIfPresent(codingKey: codingKey, typeCodingKey: TypeCodingKey.moleculeName) as? [MoleculeModelProtocol]
}
/// Decodes an array with arrays of molecules based on the identifiers, optional.
public func decodeMolecules2DIfPresent(codingKey: KeyedDecodingContainer<K>.Key) throws -> [[MoleculeModelProtocol]]? {
return try decodeModels2DIfPresent(codingKey: codingKey, typeCodingKey: TypeCodingKey.moleculeName) as? [[MoleculeModelProtocol]]
}
/// Decodes an array with arrays of models based on the identifiers.
public func decodeMolecules2D(codingKey: KeyedDecodingContainer<K>.Key) throws -> [[MoleculeModelProtocol]] {
guard let models = try decodeModels2D(codingKey: codingKey, typeCodingKey: TypeCodingKey.moleculeName) as? [[MoleculeModelProtocol]] else {
throw ModelRegistry.Error.decoderError
}
return models
}
}

View File

@ -8,23 +8,41 @@
import Foundation import Foundation
public class ListLeftVariableCheckboxAllTextAndLinksModel: ListItemModel, MoleculeModelProtocol { open class ListLeftVariableCheckboxAllTextAndLinksModel: ListItemModel, MoleculeModelProtocol {
public static var identifier: String = "listLVCB" //--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------
open class var identifier: String {
return "listLVCB"
}
public var checkbox: CheckboxModel public var checkbox: CheckboxModel
public var eyebrowHeadlineBodyLink: EyebrowHeadlineBodyLinkModel public var eyebrowHeadlineBodyLink: EyebrowHeadlineBodyLinkModel
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(checkbox: CheckboxModel, eyebrowHeadlineBodyLink: EyebrowHeadlineBodyLinkModel) { public init(checkbox: CheckboxModel, eyebrowHeadlineBodyLink: EyebrowHeadlineBodyLinkModel) {
self.checkbox = checkbox self.checkbox = checkbox
self.eyebrowHeadlineBodyLink = eyebrowHeadlineBodyLink self.eyebrowHeadlineBodyLink = eyebrowHeadlineBodyLink
super.init() super.init()
} }
//--------------------------------------------------
// MARK: - Keys
//--------------------------------------------------
private enum CodingKeys: String, CodingKey { private enum CodingKeys: String, CodingKey {
case moleculeName case moleculeName
case eyebrowHeadlineBodyLink case eyebrowHeadlineBodyLink
case checkbox case checkbox
} }
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------
required public init(from decoder: Decoder) throws { required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self) let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
eyebrowHeadlineBodyLink = try typeContainer.decode(EyebrowHeadlineBodyLinkModel.self, forKey: .eyebrowHeadlineBodyLink) eyebrowHeadlineBodyLink = try typeContainer.decode(EyebrowHeadlineBodyLinkModel.self, forKey: .eyebrowHeadlineBodyLink)
@ -32,7 +50,7 @@ public class ListLeftVariableCheckboxAllTextAndLinksModel: ListItemModel, Molecu
try super.init(from: decoder) try super.init(from: decoder)
} }
public override func encode(to encoder: Encoder) throws { open override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder) try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self) var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(moleculeName, forKey: .moleculeName) try container.encode(moleculeName, forKey: .moleculeName)

View File

@ -0,0 +1,35 @@
//
// ListOneColumnFullWidthTextBodyText.swift
// MVMCoreUI
//
// Created by Kruthika KP on 05/03/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import Foundation
@objcMembers open class ListOneColumnFullWidthTextBodyText: TableViewCell {
//-----------------------------------------------------
// MARK: - Outlets
//-----------------------------------------------------
public var headlineBody = HeadlineBody(frame: .zero)
//-----------------------------------------------------
// MARK: - View Lifecycle
//-----------------------------------------------------
override open func setupView() {
super.setupView()
addMolecule(headlineBody)
}
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?){
super.set(with: model, delegateObject, additionalData)
guard let model = model as? ListOneColumnFullWidthTextBodyTextModel else { return }
headlineBody.set(with: model.headlineBody, delegateObject, additionalData)
}
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
return 90
}
}

View File

@ -0,0 +1,43 @@
//
// ListOneColumnFullWidthTextBodyTextModel.swift
// MVMCoreUI
//
// Created by Kruthika KP on 05/03/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import Foundation
public class ListOneColumnFullWidthTextBodyTextModel: ListItemModel, MoleculeModelProtocol {
public static var identifier: String = "list1CFWBdy"
public var headlineBody: HeadlineBodyModel
public init(headlineBody: HeadlineBodyModel) {
self.headlineBody = headlineBody
super.init()
}
// Defaults to set
override public func setDefaults() {
super.setDefaults()
headlineBody.style = "item"
}
private enum CodingKeys: String, CodingKey {
case moleculeName
case headlineBody
}
required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
headlineBody = try typeContainer.decode(HeadlineBodyModel.self, forKey: .headlineBody)
try super.init(from: decoder)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(moleculeName, forKey: .moleculeName)
try container.encode(headlineBody, forKey: .headlineBody)
}
}

View File

@ -0,0 +1,73 @@
//
// ListProgressBarData.swift
// MVMCoreUI
//
// Created by Kruthika KP on 18/02/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import UIKit
@objcMembers open class ListProgressBarData: TableViewCell {
//-----------------------------------------------------
// MARK: - Outlets
//-----------------------------------------------------
let progressBar = MultiProgress(frame: .zero)
let leftLabel = Label.createLabelBoldBodySmall(true)
let rightLabel = Label.createLabelBoldBodySmall(true)
let view = MVMCoreUICommonViewsUtility.commonView()
//-----------------------------------------------------
// MARK: - MFViewProtocol
//-----------------------------------------------------
override open func setupView() {
super.setupView()
rightLabel.setContentCompressionResistancePriority(UILayoutPriority(rawValue: 900), for: .horizontal)
view.addSubview(progressBar)
view.addSubview(leftLabel)
view.addSubview(rightLabel)
contentView.addSubview(view)
containerHelper.constrainView(view)
NSLayoutConstraint.pinViews(leftView: leftLabel, rightView: rightLabel, alignTop: true, bottomAnchor: progressBar.topAnchor, constant: 8)
progressBar.leadingAnchor.constraint(equalTo: view.leadingAnchor).isActive = true
progressBar.trailingAnchor.constraint(equalTo: view.trailingAnchor).isActive = true
view.bottomAnchor.constraint(equalTo: progressBar.bottomAnchor).isActive = true
}
public override func updateView(_ size: CGFloat) {
super.updateView(size)
progressBar.updateView(size)
leftLabel.updateView(size)
rightLabel.updateView(size)
}
//-----------------------------------------------------
// MARK: - ModelMoleculeViewProtocol
//-----------------------------------------------------
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
super.set(with: model, delegateObject, additionalData)
guard let model = model as? ListProgressBarDataModel else { return}
progressBar.set(with: model.progressBar, delegateObject, additionalData)
leftLabel.set(with: model.leftLabel, delegateObject, additionalData)
rightLabel.set(with: model.rightLabel, delegateObject, additionalData)
}
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
return 90
}
//-----------------------------------------------------
// MARK: - MVMCoreUIMoleculeViewProtocol
//-----------------------------------------------------
override open func reset() {
super.reset()
progressBar.reset()
leftLabel.reset()
rightLabel.reset()
leftLabel.styleBoldBodySmall(true)
rightLabel.styleBoldBodySmall(true)
}
}

View File

@ -0,0 +1,47 @@
//
// ListProgressBarDataModel.swift
// MVMCoreUI
//
// Created by Kruthika KP on 18/02/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import Foundation
public class ListProgressBarDataModel : ListItemModel, MoleculeModelProtocol {
public static var identifier: String = "listPrgBarData"
public var progressBar : MultiProgressBarModel
public var leftLabel: LabelModel
public var rightLabel: LabelModel
public init (progressBar: MultiProgressBarModel, leftLabel: LabelModel, rightLabel: LabelModel){
self.progressBar = progressBar
self.leftLabel = leftLabel
self.rightLabel = rightLabel
super.init()
}
private enum CodingKeys: String, CodingKey{
case moleculeName
case progressBar
case leftLabel
case rightLabel
}
required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
progressBar = try typeContainer.decode(MultiProgressBarModel.self, forKey: .progressBar)
leftLabel = try typeContainer.decode(LabelModel.self, forKey: .leftLabel)
rightLabel = try typeContainer.decode(LabelModel.self, forKey: .rightLabel)
try super.init(from: decoder)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(moleculeName, forKey: .moleculeName)
try container.encode(progressBar, forKey: .progressBar)
try container.encode(leftLabel, forKey: .leftLabel)
try container.encode(rightLabel, forKey: .rightLabel)
}
}

View File

@ -38,7 +38,7 @@ import Foundation
stack.restack() stack.restack()
} }
// MARK: - MVMCoreUIMoleculeViewProtocol // MARK: - ModelMoleculeViewProtocol
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) { open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
super.set(with: model, delegateObject, additionalData) super.set(with: model, delegateObject, additionalData)
guard let model = model as? ListFourColumnDataUsageDividerModel else { return } guard let model = model as? ListFourColumnDataUsageDividerModel else { return }
@ -48,6 +48,10 @@ import Foundation
label4.set(with: model.label4, delegateObject, additionalData) label4.set(with: model.label4, delegateObject, additionalData)
} }
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {
return 121
}
// MARK: - MVMCoreUIMoleculeViewProtocol // MARK: - MVMCoreUIMoleculeViewProtocol
open override func reset() { open override func reset() {
super.reset() super.reset()
@ -56,8 +60,4 @@ import Foundation
label3.styleBoldBodySmall(true) label3.styleBoldBodySmall(true)
label4.styleBoldBodySmall(true) label4.styleBoldBodySmall(true)
} }
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {
return 121
}
} }

View File

@ -35,7 +35,7 @@ import Foundation
stack.restack() stack.restack()
} }
// MARK: - MVMCoreUIMoleculeViewProtocol // MARK: - ModelMoleculeViewProtocol
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) { open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
super.set(with: model, delegateObject, additionalData) super.set(with: model, delegateObject, additionalData)
guard let model = model as? ListThreeColumnPlanDataDividerModel else { return } guard let model = model as? ListThreeColumnPlanDataDividerModel else { return }

View File

@ -0,0 +1,63 @@
//
// Header.swift
// MVMCoreUI
//
// Created by Scott Pfeil on 3/6/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import Foundation
open class HeaderView: Container {
public let line = Line()
/// Convenience for doing some default setting
open var molecule: (UIView & MVMCoreUIMoleculeViewProtocol)?
var headerModel: HeaderModel? {
get { return model as? HeaderModel }
}
/// Convenience function to add a molecule to the view.
open func addMolecule(_ molecule: UIView & MVMCoreUIMoleculeViewProtocol) {
addSubview(molecule)
containerHelper.constrainView(molecule)
self.molecule = molecule
}
// MARK: - MVMCoreViewProtocol
open override func updateView(_ size: CGFloat) {
super.updateView(size)
line.updateView(size)
molecule?.updateView(size)
}
public override func setupView() {
super.setupView()
line.setStyle(.heavy)
addSubview(line)
NSLayoutConstraint.pinViewBottom(toSuperview: line, useMargins: false, constant: 0).isActive = true
NSLayoutConstraint.pinViewLeft(toSuperview: line, useMargins: true, constant: 0).isActive = true
NSLayoutConstraint.pinViewRight(toSuperview: line, useMargins: true, constant: 0).isActive = true
}
// MARK: - MVMCoreUIMoleculeViewProtocol
open override func reset() {
super.reset()
line.setStyle(.heavy)
molecule?.reset?()
}
// MARK: - ModelMoleculeViewProtocol
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
super.set(with: model, delegateObject, additionalData)
guard let headerModel = headerModel else { return }
if let lineModel = headerModel.line {
line.set(with: lineModel, delegateObject, additionalData)
}
}
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
return PaddingDefaultVerticalSpacing + PaddingDefaultVerticalSpacing
}
}

View File

@ -14,4 +14,9 @@ public struct ImageHeadlineBodyModel: MoleculeModelProtocol {
public var backgroundColor: Color? public var backgroundColor: Color?
public var image: ImageViewModel public var image: ImageViewModel
public var headlineBody: HeadlineBodyModel public var headlineBody: HeadlineBodyModel
public init(image: ImageViewModel, headlineBody: HeadlineBodyModel) {
self.image = image
self.headlineBody = headlineBody
}
} }

View File

@ -109,7 +109,9 @@ import UIKit
public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) { public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
super.set(with: model, delegateObject, additionalData) super.set(with: model, delegateObject, additionalData)
guard let model = model as? TwoButtonViewModel else { return } guard let model = model as? TwoButtonViewModel else { return }
if let secondaryModel = model.secondaryButton { if let secondaryModel = model.secondaryButton {
showSecondaryButton() showSecondaryButton()
secondaryButton.set(with: secondaryModel, delegateObject, additionalData) secondaryButton.set(with: secondaryModel, delegateObject, additionalData)

View File

@ -29,10 +29,7 @@ class AccordionListItemModel: MoleculeListItemModel {
required public init(from decoder: Decoder) throws { required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self) let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
guard let molecules = try typeContainer.decodeMolecules(codingKey: .molecules) as? [ListItemModelProtocol & MoleculeModelProtocol] else { molecules = try typeContainer.decodeModels(codingKey: .molecules)
throw DecodingError.typeMismatch([ListItemModelProtocol & MoleculeModelProtocol].self, DecodingError.Context(codingPath: decoder.codingPath, debugDescription: "Casting failed"))
}
self.molecules = molecules
if let hideLine = try typeContainer.decodeIfPresent(Bool.self, forKey: .hideLineWhenExpanded) { if let hideLine = try typeContainer.decodeIfPresent(Bool.self, forKey: .hideLineWhenExpanded) {
hideLineWhenExpanded = hideLine hideLineWhenExpanded = hideLine
} }

View File

@ -12,8 +12,6 @@ import UIKit
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Properties // MARK: - Properties
//-------------------------------------------------- //--------------------------------------------------
var dropDownListItemModel: DropDownListItemModel?
let dropDown = ItemDropdownEntryField() let dropDown = ItemDropdownEntryField()
var delegateObject: MVMCoreUIDelegateObject? var delegateObject: MVMCoreUIDelegateObject?
var previousIndex = NSNotFound var previousIndex = NSNotFound
@ -31,7 +29,7 @@ import UIKit
guard newValue != oldValue, guard newValue != oldValue,
let self = self, let self = self,
let index = self.dropDown.pickerData.firstIndex(of: newValue), let index = self.dropDown.pickerData.firstIndex(of: newValue),
let dropListItemJSON = self.dropDownListItemModel.toJSON(), let dropListItemJSON = (self.listItemModel as? DropDownListItemModel).toJSON(),
let json2d = dropListItemJSON.optionalArrayForKey("molecules") as? [[[AnyHashable: Any]]] let json2d = dropListItemJSON.optionalArrayForKey("molecules") as? [[[AnyHashable: Any]]]
else { return } else { return }

View File

@ -51,7 +51,7 @@ import Foundation
required public init(from decoder: Decoder) throws { required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self) let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
molecules = try typeContainer.decodeMolecules2D(codingKey: .molecules) as? [[ListItemModelProtocol & MoleculeModelProtocol]] ?? [[]] molecules = try typeContainer.decodeModels2D(codingKey: .molecules)
dropDown = try typeContainer.decode(ItemDropdownEntryFieldModel.self, forKey: .dropDown) dropDown = try typeContainer.decode(ItemDropdownEntryFieldModel.self, forKey: .dropDown)
try super.init(from: decoder) try super.init(from: decoder)
} }

View File

@ -9,13 +9,21 @@
import Foundation import Foundation
@objcMembers public class ListItemModel: ContainerModel, ListItemModelProtocol { @objcMembers open class ListItemModel: ContainerModel, ListItemModelProtocol {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------
public var backgroundColor: Color? public var backgroundColor: Color?
public var action: ActionModelProtocol? public var action: ActionModelProtocol?
public var hideArrow: Bool? public var hideArrow: Bool?
public var line: LineModel? public var line: LineModel?
public var style: String? public var style: String?
//--------------------------------------------------
// MARK: - Keys
//--------------------------------------------------
private enum CodingKeys: String, CodingKey { private enum CodingKeys: String, CodingKey {
case backgroundColor case backgroundColor
case action case action
@ -24,8 +32,12 @@ import Foundation
case style case style
} }
//--------------------------------------------------
// MARK: - Methods
//--------------------------------------------------
/// Defaults to set /// Defaults to set
public func setDefaults() { open func setDefaults() {
if useHorizontalMargins == nil { if useHorizontalMargins == nil {
useHorizontalMargins = true useHorizontalMargins = true
} }
@ -37,15 +49,23 @@ import Foundation
} }
} }
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public override init() { public override init() {
super.init() super.init()
setDefaults() setDefaults()
} }
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------
required public init(from decoder: Decoder) throws { required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self) let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor) backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
action = try typeContainer.decodeModelIfPresent(codingKey: .action, typeCodingKey: ActionCodingKey.actionType) action = try typeContainer.decodeModelIfPresent(codingKey: .action)
hideArrow = try typeContainer.decodeIfPresent(Bool.self, forKey: .hideArrow) hideArrow = try typeContainer.decodeIfPresent(Bool.self, forKey: .hideArrow)
line = try typeContainer.decodeIfPresent(LineModel.self, forKey: .line) line = try typeContainer.decodeIfPresent(LineModel.self, forKey: .line)
style = try typeContainer.decodeIfPresent(String.self, forKey: .style) style = try typeContainer.decodeIfPresent(String.self, forKey: .style)
@ -53,7 +73,7 @@ import Foundation
setDefaults() setDefaults()
} }
public override func encode(to encoder: Encoder) throws { open override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder) try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self) var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor) try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
@ -63,4 +83,3 @@ import Foundation
try container.encodeIfPresent(style, forKey: .style) try container.encodeIfPresent(style, forKey: .style)
} }
} }

View File

@ -27,7 +27,7 @@ import MVMCore
required public init(from decoder: Decoder) throws { required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self) let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
molecule = try typeContainer.decodeMolecule(codingKey: .molecule) molecule = try typeContainer.decodeModel(codingKey: .molecule)
try super.init(from: decoder) try super.init(from: decoder)
} }

View File

@ -14,18 +14,18 @@ import UIKit
// MARK: - MVMCoreUIMoleculeViewProtocol // MARK: - MVMCoreUIMoleculeViewProtocol
public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) { public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
super.set(with: model, delegateObject, additionalData)
guard let model = model as? MoleculeListItemModel else { return } guard let castModel = model as? MoleculeListItemModel else {
super.set(with: model, delegateObject, additionalData)
if molecule != nil { return
(molecule as? ModelMoleculeViewProtocol)?.set(with: model.molecule, delegateObject, additionalData)
} else if let moleculeView = MVMCoreUIMoleculeMappingObject.shared()?.createMolecule(model.molecule, delegateObject, false) {
addMolecule(moleculeView)
} }
containerHelper.set(with: model, for: molecule as? MVMCoreUIViewConstrainingProtocol) if molecule != nil {
(molecule as? ModelMoleculeViewProtocol)?.set(with: castModel.molecule, delegateObject, additionalData)
} else if let moleculeView = MVMCoreUIMoleculeMappingObject.shared()?.createMolecule(castModel.molecule, delegateObject, false) {
addMolecule(moleculeView)
}
super.set(with: model, delegateObject, additionalData)
} }
public override class func nameForReuse(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> String? { public override class func nameForReuse(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {

View File

@ -37,7 +37,7 @@ public class TabsListItemModel: ListItemModel, MoleculeModelProtocol {
required public init(from decoder: Decoder) throws { required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self) let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
tabs = try typeContainer.decode(TabsModel.self, forKey: .tabs) tabs = try typeContainer.decode(TabsModel.self, forKey: .tabs)
molecules = try typeContainer.decodeMolecules2D(codingKey: .molecules) as! [[ListItemModelProtocol & MoleculeModelProtocol]] molecules = try typeContainer.decodeModels2D(codingKey: .molecules)
try super.init(from: decoder) try super.init(from: decoder)
} }

View File

@ -34,7 +34,7 @@ public class CornerLabelsModel: MoleculeModelProtocol {
required public init(from decoder: Decoder) throws { required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self) let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor) backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
molecule = try typeContainer.decodeMoleculeIfPresent(codingKey: .molecule) molecule = try typeContainer.decodeModelIfPresent(codingKey: .molecule)
topLeftLabel = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .topLeftLabel) topLeftLabel = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .topLeftLabel)
topRightLabel = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .topRightLabel) topRightLabel = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .topRightLabel)
bottomLeftLabel = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .bottomLeftLabel) bottomLeftLabel = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .bottomLeftLabel)

View File

@ -24,7 +24,7 @@ import Foundation
required public init(from decoder: Decoder) throws { required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self) let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
molecule = try typeContainer.decodeMolecule(codingKey: .molecule) molecule = try typeContainer.decodeModel(codingKey: .molecule)
try super.init(from: decoder) try super.init(from: decoder)
} }

View File

@ -13,11 +13,11 @@ import UIKit
// MARK: - Outlets // MARK: - Outlets
//-------------------------------------------------- //--------------------------------------------------
let stack = Stack<StackModel>(frame: .zero) public let stack = Stack<StackModel>(frame: .zero)
let eyebrow = Label.commonLabelB3(true) public let eyebrow = Label.commonLabelB3(true)
let headline = Label.commonLabelB1(true) public let headline = Label.commonLabelB1(true)
let body = Label.commonLabelB2(true) public let body = Label.commonLabelB2(true)
let link = Link() public let link = Link()
var casteModel: EyebrowHeadlineBodyLinkModel? { var casteModel: EyebrowHeadlineBodyLinkModel? {
get { return model as? EyebrowHeadlineBodyLinkModel } get { return model as? EyebrowHeadlineBodyLinkModel }
@ -72,7 +72,7 @@ import UIKit
stack.restack() stack.restack()
} }
public override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? { open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
return 65 return 65
} }
} }

View File

@ -8,7 +8,7 @@
import Foundation import Foundation
@objcMembers public class HeadlineBodyModel: MoleculeModelProtocol { @objcMembers open class HeadlineBodyModel: MoleculeModelProtocol {
public static var identifier: String = "headlineBody" public static var identifier: String = "headlineBody"
public var moleculeName: String? = HeadlineBodyModel.identifier public var moleculeName: String? = HeadlineBodyModel.identifier
public var headline: LabelModel? public var headline: LabelModel?
@ -19,4 +19,8 @@ import Foundation
public init(headline: LabelModel) { public init(headline: LabelModel) {
self.headline = headline self.headline = headline
} }
public init(body: LabelModel) {
self.body = body
}
} }

View File

@ -23,7 +23,7 @@ import Foundation
public required init(from decoder: Decoder) throws { public required init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self) let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
let list = try typeContainer.decodeMolecules(codingKey: .list) let list: [MoleculeModelProtocol] = try typeContainer.decodeModels(codingKey: .list)
var models: [MoleculeStackItemModel] = [] var models: [MoleculeStackItemModel] = []
for (index, molecule) in list.enumerated() { for (index, molecule) in list.enumerated() {
models.append(MoleculeStackItemModel(with: StringAndMoleculeModel(string: "\(index+1).", molecule: molecule))) models.append(MoleculeStackItemModel(with: StringAndMoleculeModel(string: "\(index+1).", molecule: molecule)))

View File

@ -30,7 +30,7 @@ public class StringAndMoleculeModel: MoleculeModelProtocol {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self) let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor) backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
string = try typeContainer.decode(String.self, forKey: .string) string = try typeContainer.decode(String.self, forKey: .string)
molecule = try typeContainer.decodeMolecule(codingKey: .molecule) molecule = try typeContainer.decodeModel(codingKey: .molecule)
} }
public func encode(to encoder: Encoder) throws { public func encode(to encoder: Encoder) throws {

View File

@ -28,7 +28,7 @@ import Foundation
self.bulletChar = bulletChar self.bulletChar = bulletChar
} }
let list = try typeContainer.decodeMolecules(codingKey: .list) let list: [MoleculeModelProtocol] = try typeContainer.decodeModels(codingKey: .list)
var models: [MoleculeStackItemModel] = [] var models: [MoleculeStackItemModel] = []
for molecule in list { for molecule in list {
models.append(MoleculeStackItemModel(with: StringAndMoleculeModel(string: bulletChar, molecule: molecule))) models.append(MoleculeStackItemModel(with: StringAndMoleculeModel(string: bulletChar, molecule: molecule)))

View File

@ -9,7 +9,7 @@
import UIKit import UIKit
open class MoleculeStackView: Stack<MoleculeStackModel> { open class MoleculeStackView: Stack<MoleculeStackModel> {
override var stackModel: MoleculeStackModel? { open override var stackModel: MoleculeStackModel? {
get { return model as? MoleculeStackModel } get { return model as? MoleculeStackModel }
} }

View File

@ -14,11 +14,11 @@ open class Stack<T>: Container where T: (StackModelProtocol & MoleculeModelProto
// MARK: - Properties // MARK: - Properties
//-------------------------------------------------- //--------------------------------------------------
var contentView: UIView = MVMCoreUICommonViewsUtility.commonView() open var contentView: UIView = MVMCoreUICommonViewsUtility.commonView()
var stackModel: T? { open var stackModel: T? {
get { return model as? T } get { return model as? T }
} }
var stackItems: [UIView] = [] open var stackItems: [UIView] = []
//-------------------------------------------------- //--------------------------------------------------
// MARK: - Helpers // MARK: - Helpers

View File

@ -22,7 +22,9 @@
@"stack" : [[MVMCoreViewControllerProgrammaticMappingObject alloc] initWithClass:[MoleculeStackTemplate class]], @"stack" : [[MVMCoreViewControllerProgrammaticMappingObject alloc] initWithClass:[MoleculeStackTemplate class]],
@"centerMoleculeStack" : [[MVMCoreViewControllerProgrammaticMappingObject alloc] initWithClass:[MoleculeStackCenteredTemplate class]], @"centerMoleculeStack" : [[MVMCoreViewControllerProgrammaticMappingObject alloc] initWithClass:[MoleculeStackCenteredTemplate class]],
@"list" : [[MVMCoreViewControllerProgrammaticMappingObject alloc] initWithClass:[MoleculeListTemplate class]], @"list" : [[MVMCoreViewControllerProgrammaticMappingObject alloc] initWithClass:[MoleculeListTemplate class]],
@"threeLayer" : [[MVMCoreViewControllerProgrammaticMappingObject alloc] initWithClass:[ThreeLayerTemplate class]] @"threeLayer" : [[MVMCoreViewControllerProgrammaticMappingObject alloc] initWithClass:[ThreeLayerTemplate class]],
@"modalStack" : [[MVMCoreViewControllerProgrammaticMappingObject alloc] initWithClass:[ModalMoleculeStackTemplate class]],
@"modalList" : [[MVMCoreViewControllerProgrammaticMappingObject alloc] initWithClass:[ModalMoleculeListTemplate class]]
} mutableCopy]; } mutableCopy];
}); });
return viewControllerMapping; return viewControllerMapping;

View File

@ -20,6 +20,8 @@ public protocol MoleculeDelegateProtocol {
/// Asks the delegate to add or remove molecules. /// Asks the delegate to add or remove molecules.
//optional //optional
func addMolecules(_ molecules: [[AnyHashable : Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) func addMolecules(_ molecules: [[AnyHashable : Any]], sender: UITableViewCell, animation: UITableView.RowAnimation)
func addMolecules(_ molecules: [[AnyHashable : Any]], indexPath: IndexPath, animation: UITableView.RowAnimation)
func removeMolecules(_ molecules: [[AnyHashable : Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) func removeMolecules(_ molecules: [[AnyHashable : Any]], sender: UITableViewCell, animation: UITableView.RowAnimation)
//optional //optional
@ -36,6 +38,10 @@ extension MoleculeDelegateProtocol {
// Do nothing // Do nothing
} }
public func addMolecules(_ molecules: [[AnyHashable : Any]], indexPath: IndexPath, animation: UITableView.RowAnimation) {
// Do nothing
}
public func removeMolecules(_ molecules: [[AnyHashable : Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) { public func removeMolecules(_ molecules: [[AnyHashable : Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) {
// Do nothing // Do nothing
} }

View File

@ -80,6 +80,8 @@ import Foundation
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: DropDownFilterTableViewCell.self, viewModelClass: DropDownListItemModel.self) MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: DropDownFilterTableViewCell.self, viewModelClass: DropDownListItemModel.self)
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: AccordionMoleculeTableViewCell.self, viewModelClass: AccordionListItemModel.self) MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: AccordionMoleculeTableViewCell.self, viewModelClass: AccordionListItemModel.self)
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: TabsTableViewCell.self, viewModelClass: TabsListItemModel.self) MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: TabsTableViewCell.self, viewModelClass: TabsListItemModel.self)
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListProgressBarData.self, viewModelClass: ListProgressBarDataModel.self)
// Other Items // Other Items
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: MoleculeStackItem.self, viewModelClass: MoleculeStackItemModel.self) MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: MoleculeStackItem.self, viewModelClass: MoleculeStackItemModel.self)
@ -106,6 +108,7 @@ import Foundation
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListLeftVariableRadioButtonAndPaymentMethod.self, viewModelClass: ListLeftVariableRadioButtonAndPaymentMethodModel.self) MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListLeftVariableRadioButtonAndPaymentMethod.self, viewModelClass: ListLeftVariableRadioButtonAndPaymentMethodModel.self)
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListRVWheel.self, viewModelClass: ListRVWheelModel.self) MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListRVWheel.self, viewModelClass: ListRVWheelModel.self)
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListOneColumnFullWidthTextAllTextAndLinks.self, viewModelClass: ListOneColumnFullWidthTextAllTextAndLinksModel.self) MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListOneColumnFullWidthTextAllTextAndLinks.self, viewModelClass: ListOneColumnFullWidthTextAllTextAndLinksModel.self)
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListOneColumnFullWidthTextBodyText.self, viewModelClass: ListOneColumnFullWidthTextBodyTextModel.self)
// Designed Section Dividers // Designed Section Dividers
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListFourColumnDataUsageDivider.self, viewModelClass: ListFourColumnDataUsageDividerModel.self) MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListFourColumnDataUsageDivider.self, viewModelClass: ListFourColumnDataUsageDividerModel.self)

View File

@ -57,10 +57,10 @@ import Foundation
let typeContainer = try decoder.container(keyedBy: CodingKeys.self) let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
pageType = try typeContainer.decode(String.self, forKey: .pageType) pageType = try typeContainer.decode(String.self, forKey: .pageType)
screenHeading = try typeContainer.decodeIfPresent(String.self, forKey: .screenHeading) screenHeading = try typeContainer.decodeIfPresent(String.self, forKey: .screenHeading)
molecules = try typeContainer.decodeMoleculesIfPresent(codingKey: .molecules) as? [ListItemModelProtocol & MoleculeModelProtocol] molecules = try typeContainer.decodeModelsIfPresent(codingKey: .molecules)
isAtomicTabs = try typeContainer.decodeIfPresent(Bool.self, forKey: .isAtomicTabs) isAtomicTabs = try typeContainer.decodeIfPresent(Bool.self, forKey: .isAtomicTabs)
header = try typeContainer.decodeMoleculeIfPresent(codingKey: .header) header = try typeContainer.decodeModelIfPresent(codingKey: .header)
footer = try typeContainer.decodeMoleculeIfPresent(codingKey: .footer) footer = try typeContainer.decodeModelIfPresent(codingKey: .footer)
line = try typeContainer.decodeIfPresent(LineModel.self, forKey: .line) line = try typeContainer.decodeIfPresent(LineModel.self, forKey: .line)
} }

View File

@ -0,0 +1,20 @@
//
// ModalMoleculeListTemplate.swift
// MVMCoreUI
//
// Created by Ryan on 3/6/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import UIKit
open class ModalMoleculeListTemplate: MoleculeListTemplate {
override open func newDataBuildScreen() {
super.newDataBuildScreen()
MVMCoreUICommonViewsUtility.addCloseButton(to: view, action: {[weak self] _ in
self?.dismiss()
}, verticalCentered: false)
}
}

View File

@ -0,0 +1,20 @@
//
// ModalMoleculeStackTemplate.swift
// MVMCoreUI
//
// Created by Ryan on 3/6/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import UIKit
open class ModalMoleculeStackTemplate: MoleculeStackTemplate {
override open func newDataBuildScreen() {
super.newDataBuildScreen()
MVMCoreUICommonViewsUtility.addCloseButton(to: view, action: {[weak self] _ in
self?.dismiss()
}, verticalCentered: false)
}
}

View File

@ -178,8 +178,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
} }
} }
public override func addMolecules(_ molecules: [[AnyHashable: Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) { open override func addMolecules(_ molecules: [[AnyHashable : Any]], indexPath: IndexPath, animation: UITableView.RowAnimation) {
var tmpMolecules = [ListItemModelProtocol & MoleculeModelProtocol]() var tmpMolecules = [ListItemModelProtocol & MoleculeModelProtocol]()
molecules.forEach { molecule in molecules.forEach { molecule in
@ -189,7 +188,6 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
} }
DispatchQueue.main.async { DispatchQueue.main.async {
guard let indexPath = self.tableView?.indexPath(for: sender) else { return }
var indexPaths: [IndexPath] = [] var indexPaths: [IndexPath] = []
for molecule in tmpMolecules { for molecule in tmpMolecules {
@ -207,7 +205,17 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
} }
} }
public override func removeMolecules(_ molecules: [[AnyHashable: Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) { open override func addMolecules(_ molecules: [[AnyHashable: Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) {
DispatchQueue.main.async { [weak self] in
guard let indexPath = self?.tableView?.indexPath(for: sender) else { return }
DispatchQueue.global().async {
self?.addMolecules(molecules, indexPath: indexPath, animation: animation)
}
}
}
open override func removeMolecules(_ molecules: [[AnyHashable: Any]], sender: UITableViewCell, animation: UITableView.RowAnimation) {
var tmpMolecules = [ListItemModelProtocol & MoleculeModelProtocol]() var tmpMolecules = [ListItemModelProtocol & MoleculeModelProtocol]()
@ -235,7 +243,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
view.layoutIfNeeded() view.layoutIfNeeded()
} }
public func addMolecules(_ molecules: [ListItemModelProtocol & MoleculeModelProtocol], sender: UITableViewCell, animation: UITableView.RowAnimation) { open func addMolecules(_ molecules: [ListItemModelProtocol & MoleculeModelProtocol], sender: UITableViewCell, animation: UITableView.RowAnimation) {
// This dispatch is needed to fix a race condition that can occur if this function is called during the table setup. // This dispatch is needed to fix a race condition that can occur if this function is called during the table setup.
DispatchQueue.main.async { DispatchQueue.main.async {
@ -257,7 +265,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
} }
} }
public func removeMolecules(_ molecules: [ListItemModelProtocol & MoleculeModelProtocol], sender: UITableViewCell, animation: UITableView.RowAnimation) { open func removeMolecules(_ molecules: [ListItemModelProtocol & MoleculeModelProtocol], sender: UITableViewCell, animation: UITableView.RowAnimation) {
var indexPaths: [IndexPath] = [] var indexPaths: [IndexPath] = []
//TODO: cehck for molecule protocola eqality //TODO: cehck for molecule protocola eqality

View File

@ -40,8 +40,8 @@ import Foundation
moleculeStack = try typeContainer.decode(MoleculeStackModel.self, forKey: .stack) moleculeStack = try typeContainer.decode(MoleculeStackModel.self, forKey: .stack)
screenHeading = try typeContainer.decodeIfPresent(String.self, forKey: .screenHeading) screenHeading = try typeContainer.decodeIfPresent(String.self, forKey: .screenHeading)
isAtomicTabs = try typeContainer.decodeIfPresent(Bool.self, forKey: .isAtomicTabs) isAtomicTabs = try typeContainer.decodeIfPresent(Bool.self, forKey: .isAtomicTabs)
header = try typeContainer.decodeMoleculeIfPresent(codingKey: .header) header = try typeContainer.decodeModelIfPresent(codingKey: .header)
footer = try typeContainer.decodeMoleculeIfPresent(codingKey: .footer) footer = try typeContainer.decodeModelIfPresent(codingKey: .footer)
} }
public func encode(to encoder: Encoder) throws { public func encode(to encoder: Encoder) throws {

View File

@ -40,9 +40,9 @@ import Foundation
pageType = try typeContainer.decode(String.self, forKey: .pageType) pageType = try typeContainer.decode(String.self, forKey: .pageType)
screenHeading = try typeContainer.decodeIfPresent(String.self, forKey: .screenHeading) screenHeading = try typeContainer.decodeIfPresent(String.self, forKey: .screenHeading)
isAtomicTabs = try typeContainer.decodeIfPresent(Bool.self, forKey: .isAtomicTabs) isAtomicTabs = try typeContainer.decodeIfPresent(Bool.self, forKey: .isAtomicTabs)
header = try typeContainer.decodeMoleculeIfPresent(codingKey: .header) header = try typeContainer.decodeModelIfPresent(codingKey: .header)
middle = try typeContainer.decodeMoleculeIfPresent(codingKey: .middle) middle = try typeContainer.decodeModelIfPresent(codingKey: .middle)
footer = try typeContainer.decodeMoleculeIfPresent(codingKey: .footer) footer = try typeContainer.decodeModelIfPresent(codingKey: .footer)
} }
public func encode(to encoder: Encoder) throws { public func encode(to encoder: Encoder) throws {

View File

@ -14,6 +14,9 @@ extern NSString * _Nonnull const DSBold;
extern NSString * _Nonnull const DSRegular; extern NSString * _Nonnull const DSRegular;
extern NSString * _Nonnull const TXBold; extern NSString * _Nonnull const TXBold;
extern NSString * _Nonnull const TXRegular; extern NSString * _Nonnull const TXRegular;
//2.0 font
extern NSString * _Nonnull const DS75Bd;
extern NSString * _Nonnull const DS55Rg;
@interface MFFonts : NSObject @interface MFFonts : NSObject

View File

@ -17,6 +17,10 @@ NSString * const DSRegular = @"VerizonNHGeDS-Regular";
NSString * const TXBold = @"VerizonNHGeTX-Bold"; NSString * const TXBold = @"VerizonNHGeTX-Bold";
NSString * const TXRegular = @"VerizonNHGeTX-Regular"; NSString * const TXRegular = @"VerizonNHGeTX-Regular";
//2.0 font
NSString * const DS75Bd = @"NHaasGroteskDSStd-75Bd";
NSString * const DS55Rg = @"NHaasGroteskDSStd-55Rg";
@implementation MFFonts @implementation MFFonts
@ -27,6 +31,8 @@ NSString * const TXRegular = @"VerizonNHGeTX-Regular";
[MFFonts loadFont:DSRegular type:@"otf"]; [MFFonts loadFont:DSRegular type:@"otf"];
[MFFonts loadFont:TXBold type:@"otf"]; [MFFonts loadFont:TXBold type:@"otf"];
[MFFonts loadFont:TXRegular type:@"otf"]; [MFFonts loadFont:TXRegular type:@"otf"];
[MFFonts loadFont:DS75Bd type:@"otf"];
[MFFonts loadFont:DS55Rg type:@"otf"];
[MFFonts loadFont:@"OCRAExtended" type:@"ttf"]; [MFFonts loadFont:@"OCRAExtended" type:@"ttf"];
}); });
} }
@ -49,50 +55,44 @@ NSString * const TXRegular = @"VerizonNHGeTX-Regular";
} }
+ (nonnull UIFont *)mfFontDSBold:(CGFloat)size { + (nonnull UIFont *)mfFontDSBold:(CGFloat)size {
[self loadMVMFonts];
UIFont *font = [UIFont fontWithName:DSBold size:size]; UIFont *font = [UIFont fontWithName:DSBold size:size];
[self validFont:font fontName:DSBold]; [self validFont:font fontName:DSBold];
return font ?: [UIFont boldSystemFontOfSize:size]; return font ?: [UIFont boldSystemFontOfSize:size];
} }
+ (nonnull UIFont *)mfFontDSRegular:(CGFloat)size { + (nonnull UIFont *)mfFontDSRegular:(CGFloat)size {
[self loadMVMFonts];
UIFont *font = [UIFont fontWithName:DSRegular size:size]; UIFont *font = [UIFont fontWithName:DSRegular size:size];
[self validFont:font fontName:DSRegular]; [self validFont:font fontName:DSRegular];
return font ?: [UIFont systemFontOfSize:size]; return font ?: [UIFont systemFontOfSize:size];
} }
+ (nonnull UIFont *)mfFontTXBold:(CGFloat)size { + (nonnull UIFont *)mfFontTXBold:(CGFloat)size {
[self loadMVMFonts];
UIFont *font = [UIFont fontWithName:TXBold size:size]; UIFont *font = [UIFont fontWithName:TXBold size:size];
[self validFont:font fontName:TXBold]; [self validFont:font fontName:TXBold];
return font ?: [UIFont boldSystemFontOfSize:size]; return font ?: [UIFont boldSystemFontOfSize:size];
} }
+ (nonnull UIFont *)mfFontTXRegular:(CGFloat)size { + (nonnull UIFont *)mfFontTXRegular:(CGFloat)size {
[self loadMVMFonts];
UIFont *font = [UIFont fontWithName:TXRegular size:size]; UIFont *font = [UIFont fontWithName:TXRegular size:size];
[self validFont:font fontName:TXRegular]; [self validFont:font fontName:TXRegular];
return font ?: [UIFont systemFontOfSize:size]; return font ?: [UIFont systemFontOfSize:size];
} }
+ (UIFont *)mfFont75Bd:(CGFloat)size { + (nonnull UIFont *)mfFont75Bd:(CGFloat)size {
[self loadMVMFonts]; [self loadMVMFonts];
UIFont *font; UIFont *font = [UIFont fontWithName:DS75Bd size:size];
if (size >= 15) { return font ?: [UIFont boldSystemFontOfSize:size];
font = [self mfFontDSBold:size];
} else {
font = [self mfFontTXBold:size];
}
return font;
} }
+ (UIFont *)mfFont55Rg:(CGFloat)size { + (nonnull UIFont *)mfFont55Rg:(CGFloat)size {
[self loadMVMFonts]; [self loadMVMFonts];
UIFont *font; UIFont *font = [UIFont fontWithName:DS55Rg size:size];
if (size >= 15) { return font ?: [UIFont systemFontOfSize:size];
font = [self mfFontDSRegular:size];
} else {
font = [self mfFontTXRegular:size];
}
return font;
} }
+ (nullable UIFont *)mfFontOcratxt:(CGFloat)size { + (nullable UIFont *)mfFontOcratxt:(CGFloat)size {