Merge branch 'bugfix/match_android_stack_margin' into 'develop'
Bugfix/match android stack margin See merge request BPHV_MIPS/mvm_core_ui!485
This commit is contained in:
commit
2daf9a7545
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user