From 7b4f7885067e2c82a1dc5636d9b5e674fd20841e Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Fri, 29 Jan 2021 16:31:30 -0500 Subject: [PATCH] Bug fix and warning fix --- .../Molecules/HorizontalCombinationViews/TabBar.swift | 7 +++++-- MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.m | 2 +- MVMCoreUI/TopAlert/MVMCoreUITopAlertView.m | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/TabBar.swift b/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/TabBar.swift index 1ee7ee71..1565cf30 100644 --- a/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/TabBar.swift +++ b/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/TabBar.swift @@ -57,8 +57,11 @@ import Foundation var tabs: [UITabBarItem] = [] for (index, tab) in model.tabs.enumerated() { let tabBarItem = UITabBarItem(title: tab.title, image: MVMCoreCache.shared()?.getImageFromRegisteredBundles(tab.image), tag: index) - tabBarItem.titlePositionAdjustment = UIOffset(horizontal: 0, vertical: -3) - tabBarItem.setTitleTextAttributes([NSAttributedString.Key.font: MFFonts.mfFontTXRegular(8)], for: .normal) + if #available(iOS 13.0, *) { + } else { + tabBarItem.titlePositionAdjustment = UIOffset(horizontal: 0, vertical: -3) + tabBarItem.setTitleTextAttributes([NSAttributedString.Key.font: MFFonts.mfFontTXRegular(8)], for: .normal) + } tabs.append(tabBarItem) } setItems(tabs, animated: false) diff --git a/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.m b/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.m index 55468c95..46ecd793 100644 --- a/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.m +++ b/MVMCoreUI/TopAlert/MVMCoreUITopAlertExpandableView.m @@ -211,7 +211,7 @@ if (topMessage && (!self.onlyShowTopMessageWhenCollapsed || !self.expanded)) { self.shortViewHeight.active = NO; - } else if (!topMessage && self.onlyShowTopMessageWhenCollapsed && self.expanded) { + } else if (!topMessage || (self.onlyShowTopMessageWhenCollapsed && self.expanded)) { self.shortViewHeight.active = YES; } }]; diff --git a/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.m b/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.m index 4ac5aaa0..ad0a833f 100644 --- a/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.m +++ b/MVMCoreUI/TopAlert/MVMCoreUITopAlertView.m @@ -113,8 +113,8 @@ NSString * const MFAccTopAlertClosed = @"Top alert notification is closed."; - (void)pinATopViewController:(UIViewController *)viewController { self.statusBarHeightConstraint.active = NO; - id topGuide = viewController.topLayoutGuide; - self.statusBarBottomConstraint = [NSLayoutConstraint constraintWithItem:self.statusBarView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:topGuide attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0]; + id topGuide = viewController.view.safeAreaLayoutGuide; + self.statusBarBottomConstraint = [NSLayoutConstraint constraintWithItem:self.statusBarView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:topGuide attribute:NSLayoutAttributeTop multiplier:1.0 constant:0]; self.statusBarBottomConstraint.active = YES; }