Bug fix and warning fix
This commit is contained in:
parent
ff8f82e19f
commit
7b4f788506
@ -57,8 +57,11 @@ import Foundation
|
|||||||
var tabs: [UITabBarItem] = []
|
var tabs: [UITabBarItem] = []
|
||||||
for (index, tab) in model.tabs.enumerated() {
|
for (index, tab) in model.tabs.enumerated() {
|
||||||
let tabBarItem = UITabBarItem(title: tab.title, image: MVMCoreCache.shared()?.getImageFromRegisteredBundles(tab.image), tag: index)
|
let tabBarItem = UITabBarItem(title: tab.title, image: MVMCoreCache.shared()?.getImageFromRegisteredBundles(tab.image), tag: index)
|
||||||
tabBarItem.titlePositionAdjustment = UIOffset(horizontal: 0, vertical: -3)
|
if #available(iOS 13.0, *) {
|
||||||
tabBarItem.setTitleTextAttributes([NSAttributedString.Key.font: MFFonts.mfFontTXRegular(8)], for: .normal)
|
} else {
|
||||||
|
tabBarItem.titlePositionAdjustment = UIOffset(horizontal: 0, vertical: -3)
|
||||||
|
tabBarItem.setTitleTextAttributes([NSAttributedString.Key.font: MFFonts.mfFontTXRegular(8)], for: .normal)
|
||||||
|
}
|
||||||
tabs.append(tabBarItem)
|
tabs.append(tabBarItem)
|
||||||
}
|
}
|
||||||
setItems(tabs, animated: false)
|
setItems(tabs, animated: false)
|
||||||
|
|||||||
@ -211,7 +211,7 @@
|
|||||||
|
|
||||||
if (topMessage && (!self.onlyShowTopMessageWhenCollapsed || !self.expanded)) {
|
if (topMessage && (!self.onlyShowTopMessageWhenCollapsed || !self.expanded)) {
|
||||||
self.shortViewHeight.active = NO;
|
self.shortViewHeight.active = NO;
|
||||||
} else if (!topMessage && self.onlyShowTopMessageWhenCollapsed && self.expanded) {
|
} else if (!topMessage || (self.onlyShowTopMessageWhenCollapsed && self.expanded)) {
|
||||||
self.shortViewHeight.active = YES;
|
self.shortViewHeight.active = YES;
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
|
|||||||
@ -113,8 +113,8 @@ NSString * const MFAccTopAlertClosed = @"Top alert notification is closed.";
|
|||||||
|
|
||||||
- (void)pinATopViewController:(UIViewController *)viewController {
|
- (void)pinATopViewController:(UIViewController *)viewController {
|
||||||
self.statusBarHeightConstraint.active = NO;
|
self.statusBarHeightConstraint.active = NO;
|
||||||
id topGuide = viewController.topLayoutGuide;
|
id topGuide = viewController.view.safeAreaLayoutGuide;
|
||||||
self.statusBarBottomConstraint = [NSLayoutConstraint constraintWithItem:self.statusBarView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:topGuide attribute:NSLayoutAttributeBottom multiplier:1.0 constant:0];
|
self.statusBarBottomConstraint = [NSLayoutConstraint constraintWithItem:self.statusBarView attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:topGuide attribute:NSLayoutAttributeTop multiplier:1.0 constant:0];
|
||||||
self.statusBarBottomConstraint.active = YES;
|
self.statusBarBottomConstraint.active = YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user