From 45689c7c51b7ee1ad99a2a5f9c93e9ec8dbe05d8 Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Sat, 27 Jul 2019 17:31:19 -0400 Subject: [PATCH] Made fix to TopLabelBottomButtomVC. Added close X image to replace 'X' char. --- .../TopLabelsAndBottomButtonsViewController.h | 1 + .../TopLabelsAndBottomButtonsViewController.m | 5 ++-- .../closeXBlack.imageset/Contents.json | 23 ++++++++++++++++++ .../closeXBlack.imageset/closeXBlack.png | Bin 0 -> 215 bytes .../closeXBlack.imageset/closeXBlack@2x.png | Bin 0 -> 374 bytes .../closeXBlack.imageset/closeXBlack@3x.png | Bin 0 -> 535 bytes .../Utility/MVMCoreUICommonViewsUtility.m | 2 +- 7 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 MVMCoreUI/SupportingFiles/Media.xcassets/closeXBlack.imageset/Contents.json create mode 100644 MVMCoreUI/SupportingFiles/Media.xcassets/closeXBlack.imageset/closeXBlack.png create mode 100644 MVMCoreUI/SupportingFiles/Media.xcassets/closeXBlack.imageset/closeXBlack@2x.png create mode 100644 MVMCoreUI/SupportingFiles/Media.xcassets/closeXBlack.imageset/closeXBlack@3x.png diff --git a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsViewController.h b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsViewController.h index 720f0097..4abdb035 100644 --- a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsViewController.h +++ b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsViewController.h @@ -24,6 +24,7 @@ @property (nullable, weak, nonatomic) UIView *viewOutOfScroll; @property (nullable, strong, nonatomic) UIView *safeAreaView; @property (nullable, weak, nonatomic) ViewConstrainingView *bottomAccessoryView; +//@property (nullable, strong, nonatomic) NSLayoutConstraint *heightConstraint; // Set to overwrite which view is the top edge and/or bottom edge of the between view. must be added to the ui and constrained before buildViewsBetweenLabelsAndButtons. // Use these to create views that are pinned near the labels or buttons and are separate from any centered content. Add and set in buildInAdditionalViewsBeforeCenteredContent. diff --git a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsViewController.m b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsViewController.m index 0fcc51a2..77472e11 100644 --- a/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsViewController.m +++ b/MVMCoreUI/LegacyControllers/TopLabelsAndBottomButtonsViewController.m @@ -303,8 +303,9 @@ } - (void)addViewToContentView:(UIView *)bottomView { - - self.bottomConstraint.active = YES; + if (![self bottomViewOutsideOfScroll]) { + self.bottomConstraint.active = YES; + } // Buttons will be at the bottom of the content view. [self.contentView addSubview:bottomView]; diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/closeXBlack.imageset/Contents.json b/MVMCoreUI/SupportingFiles/Media.xcassets/closeXBlack.imageset/Contents.json new file mode 100644 index 00000000..d7771f8a --- /dev/null +++ b/MVMCoreUI/SupportingFiles/Media.xcassets/closeXBlack.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "closeXBlack.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "closeXBlack@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "closeXBlack@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/closeXBlack.imageset/closeXBlack.png b/MVMCoreUI/SupportingFiles/Media.xcassets/closeXBlack.imageset/closeXBlack.png new file mode 100644 index 0000000000000000000000000000000000000000..5f31bd2848e43db0f21a371def0f620059cf46a6 GIT binary patch literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^LLkh+1|-AI^@Rf|#^NA%Cx&(BWL^R}6FprVLo5W> zPH_}!P~dQ#+ZQ1I`d@j*%{a|KqaQ1hjrlnK*Uk`Y`%vfJXS{I3l$e)ug!PUH>^Amp zwVo?zJlRm%#@8kMHP@$WvA30tuLyHr4`JRCrRt#OIFtEE-p0n?{${t6W81ec)cCxR zQ)Px$FiAu~R9Fekm|+gWAPj{UPr`q_|9SZBCA3vp7&7+yC~Qs0q_ppQu(%~#mJ3G^ zZ;uoFDO1^-2r`Q@o-$^dQkF8Kj38r;yZq9H*Y7&RR5Fv8>R}UQ!AMgu3ohJj#WpcB z%nb%Vv^L$?FxRcwEs&XW)AA7V(8%`oeJ-(&1a~vZ86(W}Bp!6N04%i-e6I)rAvJsY zRK5jltx+(vsRpj)P(7Er(g6EUbTN}ea#QK8tvNbwbms*d^V8AWb?PlE&FH+An{tjV zaBFRdIRuE*xR|qmEVYz52Eg<{=6ZyCdaLF<1U)o9=G=rtty`;GpmN@{Cf!&uQKrn= z=7y38%wYyx2tbcY4q2D`*brn(QHH*;)%~nUClv)4N~k9OK8ch?1Ln#M19W{P-_;Ag UXN9MmJpcdz07*qoM6N<$g7AT$p8x;= literal 0 HcmV?d00001 diff --git a/MVMCoreUI/SupportingFiles/Media.xcassets/closeXBlack.imageset/closeXBlack@3x.png b/MVMCoreUI/SupportingFiles/Media.xcassets/closeXBlack.imageset/closeXBlack@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..598475659e712adada27405d4a675351fa7a3a92 GIT binary patch literal 535 zcmV+y0_gpTP)Px$(Md!>RA>e5nq5xAFc5?*o_OZsy$-kFNZ_gDDr(m0{>+#dYRPJecW1tF3{p@o zm)BT(2i_b0wat%(Vt^IQU^fRAKHL0m^Q+Aj!hsR2Ute6MbQRM^7L))=Z7a+D+6?0v9```_ zGShIH*EFNeR?0o)2AeRCUuE7h;l~6AKhqiLf(P)=mS`+Ap=ZQ_^)gdgAOIUJO|zvN zqlAU}Fk`r(09S1dv0j^7|3^#sjh8BEqTdRK47>4XU+Y6sghOiV#wr7>U^d@XTqVSd Z^9Mh_uZWnsYPA3W002ovPDHLkV1mNA@q_>X literal 0 HcmV?d00001 diff --git a/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.m b/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.m index 487a7b51..41237640 100644 --- a/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.m +++ b/MVMCoreUI/Utility/MVMCoreUICommonViewsUtility.m @@ -181,7 +181,7 @@ static const CGFloat VertialShadowOffset = 6; + (nonnull MFCustomButton *)addCloseButtonToView:(UIView *)view action:(ButtonTapBlock)actionBlock verticalCentered:(BOOL)verticalCentered { MFCustomButton *button = [[MFCustomButton alloc] initWithFrame:CGRectZero]; button.translatesAutoresizingMaskIntoConstraints = NO; - [button setTitle:@"✕" forState:UIControlStateNormal]; + [button setImage:[MVMCoreUIUtility imageNamed:@"closeXBlack"] forState:UIControlStateNormal]; button.titleLabel.font = [MFStyler fontForHeadlineAlternative]; //accessibility