Merge branch 'develop' into feature/Headers_H1_LandingPageHeader
This commit is contained in:
commit
5448371a65
@ -50,15 +50,15 @@ open class MoleculeStackTemplate: ThreeLayerViewController, TemplateProtocol {
|
||||
}
|
||||
|
||||
open override func viewForMiddle() -> UIView? {
|
||||
guard let moleculeStackModel = templateModel?.moleculeStack else { return nil }
|
||||
|
||||
guard let moleculeStackModel = templateModel?.moleculeStack else {
|
||||
return nil
|
||||
}
|
||||
|
||||
// By default: Stack template stack has vertical space before the first item, dynamic stack items have default horizontal padding.
|
||||
let stack = MoleculeStackView(frame: .zero)
|
||||
moleculeStackModel.useStackSpacingBeforeFirstItem = true
|
||||
if moleculeStackModel.useHorizontalMargins == nil {
|
||||
moleculeStackModel.useHorizontalMargins = true
|
||||
for stackItem in moleculeStackModel.molecules {
|
||||
guard let stackItem = stackItem as? MoleculeStackItemModel,
|
||||
stackItem.horizontalAlignment == nil else { continue }
|
||||
stackItem.useHorizontalMargins = true
|
||||
}
|
||||
stack.set(with: moleculeStackModel, delegateObject() as? MVMCoreUIDelegateObject, nil)
|
||||
return stack
|
||||
|
||||
@ -240,7 +240,7 @@ CGFloat const PanelAnimationDuration = 0.2;
|
||||
if (extraButtons) {
|
||||
[leftBarButtonItems addObjectsFromArray:extraButtons];
|
||||
}
|
||||
if ((accessible && !extended) && self.leftPanelButton) {
|
||||
if ((accessible && !extended) && self.leftPanelButton && ![extraButtons containsObject:self.leftPanelButton]) {
|
||||
[leftBarButtonItems addObject:self.leftPanelButton];
|
||||
}
|
||||
[viewController.navigationItem setLeftBarButtonItems:(leftBarButtonItems.count > 0 ? leftBarButtonItems : nil) animated:!DisableAnimations];
|
||||
@ -407,10 +407,10 @@ CGFloat const PanelAnimationDuration = 0.2;
|
||||
|
||||
- (void)setRightNavigationItemForViewController:(UIViewController * _Nonnull)viewController accessible:(BOOL)accessible extended:(BOOL)extended {
|
||||
NSMutableArray *navigationItems = [[NSMutableArray alloc] init];
|
||||
if ((accessible && !extended) && self.rightPanelButton) {
|
||||
NSArray *extraButtons = [self additionalRightButtonsForViewController:viewController];
|
||||
if ((accessible && !extended) && self.rightPanelButton && ![extraButtons containsObject:self.rightPanelButton]) {
|
||||
[navigationItems addObject:self.rightPanelButton];
|
||||
}
|
||||
NSArray *extraButtons = [self additionalRightButtonsForViewController:viewController];
|
||||
if (extraButtons) {
|
||||
[navigationItems addObjectsFromArray:extraButtons];
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user