From 36d223e0de967e12fd78d871c35334a86c1c145d Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Tue, 11 Jun 2019 09:41:44 -0400 Subject: [PATCH] stack fixing. work in progress --- MVMCoreUI.xcodeproj/project.pbxproj | 4 - MVMCoreUI/Atoms/Views/Label.swift | 4 - MVMCoreUI/Atoms/Views/ViewConstrainingView.h | 6 + MVMCoreUI/Atoms/Views/ViewConstrainingView.m | 20 +++ .../NSLayoutConstraint+MFConvenience.h | 2 +- MVMCoreUI/Molecules/HorizontalStackView.swift | 75 --------- MVMCoreUI/Molecules/MoleculeStackView.swift | 146 +++++++++++++----- .../MVMCoreUIMoleculeMappingObject.m | 3 +- 8 files changed, 136 insertions(+), 124 deletions(-) delete mode 100644 MVMCoreUI/Molecules/HorizontalStackView.swift diff --git a/MVMCoreUI.xcodeproj/project.pbxproj b/MVMCoreUI.xcodeproj/project.pbxproj index 2df3793d..401a5589 100644 --- a/MVMCoreUI.xcodeproj/project.pbxproj +++ b/MVMCoreUI.xcodeproj/project.pbxproj @@ -39,7 +39,6 @@ D296E1412295EBBA0051EBE7 /* MoleculeDelegateProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D296E1402295EBBA0051EBE7 /* MoleculeDelegateProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; D296E143229729C30051EBE7 /* MoleculeMappingObject+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D296E142229729C30051EBE7 /* MoleculeMappingObject+Extension.swift */; }; D296E14722A5984C0051EBE7 /* MVMCoreUIViewConstrainingProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D296E14622A597490051EBE7 /* MVMCoreUIViewConstrainingProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D296E15A22A7FBCC0051EBE7 /* HorizontalStackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D296E15922A7FBCC0051EBE7 /* HorizontalStackView.swift */; }; D29770C821F7C4AE00B2F0D0 /* TopLabelsView.m in Sources */ = {isa = PBXBuildFile; fileRef = D29770C621F7C4AE00B2F0D0 /* TopLabelsView.m */; }; D29770C921F7C4AE00B2F0D0 /* TopLabelsView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29770C721F7C4AE00B2F0D0 /* TopLabelsView.h */; settings = {ATTRIBUTES = (Public, ); }; }; D29770F221F7C6D600B2F0D0 /* TopLabelsAndBottomButtonsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D29770EE21F7C6D600B2F0D0 /* TopLabelsAndBottomButtonsTableViewController.m */; }; @@ -205,7 +204,6 @@ D296E1402295EBBA0051EBE7 /* MoleculeDelegateProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MoleculeDelegateProtocol.h; sourceTree = ""; }; D296E142229729C30051EBE7 /* MoleculeMappingObject+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MoleculeMappingObject+Extension.swift"; sourceTree = ""; }; D296E14622A597490051EBE7 /* MVMCoreUIViewConstrainingProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreUIViewConstrainingProtocol.h; sourceTree = ""; }; - D296E15922A7FBCC0051EBE7 /* HorizontalStackView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = HorizontalStackView.swift; path = /Users/scott/Documents/Source/mvmrc_ios/mvm_core_ui/MVMCoreUI/Molecules/HorizontalStackView.swift; sourceTree = ""; }; D29770C621F7C4AE00B2F0D0 /* TopLabelsView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TopLabelsView.m; sourceTree = ""; }; D29770C721F7C4AE00B2F0D0 /* TopLabelsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TopLabelsView.h; sourceTree = ""; }; D29770EE21F7C6D600B2F0D0 /* TopLabelsAndBottomButtonsTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TopLabelsAndBottomButtonsTableViewController.m; sourceTree = ""; }; @@ -465,7 +463,6 @@ D2A5145E2211DDC100345BFB /* MoleculeStackView.swift */, D274CA322236A78900B01B62 /* StandardFooterView.swift */, D2E1FADC2268B25E00AEFD8C /* MoleculeTableViewCell.swift */, - D296E15922A7FBCC0051EBE7 /* HorizontalStackView.swift */, ); path = Molecules; sourceTree = ""; @@ -916,7 +913,6 @@ D29DF27621E79E81003B2FB9 /* MVMCoreUILoggingHandler.m in Sources */, D29DF24D21E6A177003B2FB9 /* MFTextField.m in Sources */, D29DF2A221E7AF4E003B2FB9 /* MVMCoreUIUtility.m in Sources */, - D296E15A22A7FBCC0051EBE7 /* HorizontalStackView.swift in Sources */, D29DF12B21E6851E003B2FB9 /* MVMCoreUITopAlertExpandableView.m in Sources */, D29DF25421E6A177003B2FB9 /* MFMdnTextField.m in Sources */, D282AABA224131D100C46919 /* MFTransparentGIFView.swift in Sources */, diff --git a/MVMCoreUI/Atoms/Views/Label.swift b/MVMCoreUI/Atoms/Views/Label.swift index 5e3b1b5b..e6e0c46c 100644 --- a/MVMCoreUI/Atoms/Views/Label.swift +++ b/MVMCoreUI/Atoms/Views/Label.swift @@ -308,10 +308,6 @@ import MVMCore } public func setAsMolecule() { - setContentHuggingPriority(.required, for: .vertical) - setContentHuggingPriority(.required, for: .horizontal) - //setContentCompressionResistancePriority(.required, for: .horizontal) - //setContentCompressionResistancePriority(.required, for: .vertical) } public func needsToBeConstrained() -> Bool { diff --git a/MVMCoreUI/Atoms/Views/ViewConstrainingView.h b/MVMCoreUI/Atoms/Views/ViewConstrainingView.h index cba1915e..371e137b 100644 --- a/MVMCoreUI/Atoms/Views/ViewConstrainingView.h +++ b/MVMCoreUI/Atoms/Views/ViewConstrainingView.h @@ -25,6 +25,12 @@ @property (nullable, strong, nonatomic) NSLayoutConstraint *alignCenterTopPin; @property (nullable, strong, nonatomic) NSLayoutConstraint *alignCenterBottomPin; +@property (nullable, strong, nonatomic) NSLayoutConstraint *leftPinLow; +@property (nullable, strong, nonatomic) NSLayoutConstraint *rightPinLow; +@property (nullable, strong, nonatomic) NSLayoutConstraint *topPinLow; +@property (nullable, strong, nonatomic) NSLayoutConstraint *bottomPinLow; + + // In updateView, will set horizontal padding to default if set to YES. @property (nonatomic) BOOL updateViewHorizontalDefaults; diff --git a/MVMCoreUI/Atoms/Views/ViewConstrainingView.m b/MVMCoreUI/Atoms/Views/ViewConstrainingView.m index 6b8eac4d..a7412b93 100644 --- a/MVMCoreUI/Atoms/Views/ViewConstrainingView.m +++ b/MVMCoreUI/Atoms/Views/ViewConstrainingView.m @@ -61,6 +61,22 @@ self.alignCenterVerticalPin = [view.centerYAnchor constraintEqualToAnchor:view.superview.centerYAnchor]; self.alignCenterTopPin = [view.topAnchor constraintGreaterThanOrEqualToAnchor:view.superview.topAnchor]; self.alignCenterBottomPin = [view.superview.bottomAnchor constraintGreaterThanOrEqualToAnchor:view.bottomAnchor]; + + self.leftPinLow = [view.leftAnchor constraintEqualToAnchor:view.superview.leftAnchor]; + self.leftPinLow.priority = 200; + self.leftPinLow.active = YES; + + self.topPinLow = [view.topAnchor constraintEqualToAnchor:view.superview.topAnchor]; + self.topPinLow.priority = 200; + self.topPinLow.active = YES; + + self.rightPinLow = [view.superview.rightAnchor constraintEqualToAnchor:view.superview.rightAnchor]; + self.rightPinLow.priority = 200; + self.rightPinLow.active = YES; + + self.bottomPinLow = [view.superview.bottomAnchor constraintEqualToAnchor:view.superview.bottomAnchor]; + self.bottomPinLow.priority = 200; + self.bottomPinLow.active = YES; } - (void)pinToSuperView { @@ -81,21 +97,25 @@ - (void)setLeftPinConstant:(CGFloat)constant { self.leftPin.constant = constant; self.alignCenterLeftPin.constant = constant; + self.leftPinLow.constant = constant; } - (void)setRightPinConstant:(CGFloat)constant { self.rightPin.constant = constant; self.alignCenterRightPin.constant = constant; + self.rightPinLow.constant = constant; } - (void)setTopPinConstant:(CGFloat)constant { self.topPin.constant = constant; self.alignCenterTopPin.constant = constant; + self.topPinLow.constant = constant; } - (void)setBottomPinConstant:(CGFloat)constant { self.bottomPin.constant = constant; self.alignCenterBottomPin.constant = constant; + self.bottomPinLow.constant = constant; } - (void)show { diff --git a/MVMCoreUI/Categories/NSLayoutConstraint+MFConvenience.h b/MVMCoreUI/Categories/NSLayoutConstraint+MFConvenience.h index 0d0d281c..3d615da7 100644 --- a/MVMCoreUI/Categories/NSLayoutConstraint+MFConvenience.h +++ b/MVMCoreUI/Categories/NSLayoutConstraint+MFConvenience.h @@ -55,7 +55,7 @@ extern NSString * _Nonnull const ConstraintWidth; + (nullable NSDictionary *)constraintPinView:(nonnull UIView*)view heightConstraint:(BOOL)pinHeight heightConstant:(CGFloat)heightConstant widthConstraint:(BOOL)pinWidth widthConstant:(CGFloat)widthConstant; // pins 2 views in same hierarchy -+(nullable NSLayoutConstraint *)constraintPinFirstView :(nonnull UIView*)firstView toSecondView :(nonnull UIView*)secondView withConstant :(CGFloat)constant directionVertical :(BOOL)directionVertical; ++(nonnull NSLayoutConstraint *)constraintPinFirstView :(nonnull UIView*)firstView toSecondView :(nonnull UIView*)secondView withConstant :(CGFloat)constant directionVertical :(BOOL)directionVertical; +(nullable NSDictionary *)constraintAlignView :(nonnull UIView *)firstView toSecondView :(nonnull UIView *)secondView alignX :(BOOL)alignX alignY :(BOOL)alignY; diff --git a/MVMCoreUI/Molecules/HorizontalStackView.swift b/MVMCoreUI/Molecules/HorizontalStackView.swift deleted file mode 100644 index ffa7fea7..00000000 --- a/MVMCoreUI/Molecules/HorizontalStackView.swift +++ /dev/null @@ -1,75 +0,0 @@ -// -// HorizontalStackView.swift -// -// -// Created by Scott Pfeil on 6/5/19. -// - -import UIKit - -@objcMembers public class HorizontalStackView: ViewConstrainingView { - let stackView = UIStackView(frame: .zero) - - public override func updateView(_ size: CGFloat) { - super.updateView(size) - for view in stackView.arrangedSubviews { - stackView.removeArrangedSubview(view) - if let molecule = view as? MVMCoreViewProtocol { - molecule.updateView(size) - } - stackView.addArrangedSubview(view) - } - } - - override public func setupView() { - super.setupView() - guard stackView.superview == nil else { - return - } - stackView.translatesAutoresizingMaskIntoConstraints = false - stackView.distribution = .fill - addConstrainedView(stackView) - } - - public func setAxisWithJSON(_ json: [AnyHashable: Any]?) { - switch json?.optionalStringForKey("axis") { - case "horizontal": - stackView.axis = .horizontal - default: - stackView.axis = .vertical - } - } - - override public func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) { - super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData) - MVMCoreUIStackableViewController.remove(stackView.subviews) - - // Set the horizontal alignment for the stack in the containing view. Typically fill, but occasionally others for horizontal stacks. - //align(ViewConstrainingView.getAlignmentFor(json?.optionalStringForKey("alignment"), defaultAlignment: UIStackView.Alignment.fill)) - - // Sets the stack attributes - setAxisWithJSON(json) - stackView.spacing = json?.optionalCGFloatForKey("spacing") ?? 16 - - // The alignment of the items perpendicular to the axis. - stackView.alignment = ViewConstrainingView.getAlignmentFor(json?.optionalStringForKey("itemAlignment"), defaultAlignment: UIStackView.Alignment.fill) - - guard let molecules = json?.optionalArrayForKey("molecules") else { - return - } - for case let map as [AnyHashable: Any] in molecules { - if let molecule = MVMCoreUIMoleculeMappingObject.shared()?.createMolecule(forJSON: map, delegateObject: delegateObject, constrainIfNeeded: true) { - if let moleculeCast = molecule as? MVMCoreUIViewConstrainingProtocol { - // Set the horizontal alignement of the molecule. - //moleculeCast.align!(ViewConstrainingView.getAlignmentFor(map.optionalStringForKey("alignment"), defaultAlignment: .fill)) - - // Currently no vertical margins. - moleculeCast.shouldSetVerticalMargins?(false) - moleculeCast.shouldSetHorizontalMargins?(stackView.axis == .vertical) - } - - stackView.addArrangedSubview(molecule) - } - } - } -} diff --git a/MVMCoreUI/Molecules/MoleculeStackView.swift b/MVMCoreUI/Molecules/MoleculeStackView.swift index b21e2245..efd4752e 100644 --- a/MVMCoreUI/Molecules/MoleculeStackView.swift +++ b/MVMCoreUI/Molecules/MoleculeStackView.swift @@ -8,48 +8,49 @@ import UIKit +public class StackItem { + var view: UIView + var spacing: CGFloat? + var percentage: Int? + var verticalAlignment: UIStackView.Alignment? + var horizontalAlignment: UIStackView.Alignment? + + init(with view: UIView) { + self.view = view + } + + init(with view: UIView, json: [AnyHashable: Any]) { + self.view = view + spacing = json.optionalCGFloatForKey("spacing") + percentage = json["percent"] as? Int + if let alignment = json.optionalStringForKey("verticalAlignment") { + verticalAlignment = ViewConstrainingView.getAlignmentFor(alignment, defaultAlignment: .fill) + } + if let alignment = json.optionalStringForKey("horizontalAlignment") { + horizontalAlignment = ViewConstrainingView.getAlignmentFor(alignment, defaultAlignment: .fill) + } + } +} + public class MoleculeStackView: ViewConstrainingView { var spacingBlock: ((Any) -> UIEdgeInsets)? - var moleculesArray: [UIView]? var useMargins: Bool = false - var alignment: UIStackView.Alignment = .fill - var contentView: UIView = MVMCoreUICommonViewsUtility.commonView() - private var spacingBetweenItems: [NSLayoutConstraint]? + var contentView: UIView = MVMCoreUICommonViewsUtility.commonView() + var items: [StackItem] = [] + + private var spacingConstraints: [NSLayoutConstraint] = [] /// For setting the direction of the stack var axis: NSLayoutConstraint.Axis = .vertical { didSet { if axis != oldValue { - MVMCoreDispatchUtility.performBlock(onMainThread: { - // remove constraints - if self.axis == .vertical { - // layout vertical - } else { - // layout horizontal - } - }) + restack() } } } - /// For setting the alignment perpendicular to the direction of the stack. Default fill for vertical and center for horizontal. Can be overriden at the item level. - var itemAlignment: UIStackView.Alignment = .fill { - didSet { - if itemAlignment != oldValue { - MVMCoreDispatchUtility.performBlock(onMainThread: { - // remove constraints - if self.axis == .vertical { - // layout vertical - } else { - // layout horizontal - } - }) - } - } - } - - var spacing: Float = 16 { + var spacing: CGFloat = 16 { didSet { if spacing != oldValue { MVMCoreDispatchUtility.performBlock(onMainThread: { @@ -69,10 +70,11 @@ public class MoleculeStackView: ViewConstrainingView { } - public func pinView(_ view: UIView, toView: UIView, attribute: NSLayoutConstraint.Attribute, relation: NSLayoutConstraint.Relation, priority: UILayoutPriority, constant: CGFloat) { + public func pinView(_ view: UIView, toView: UIView, attribute: NSLayoutConstraint.Attribute, relation: NSLayoutConstraint.Relation, priority: UILayoutPriority, constant: CGFloat) -> NSLayoutConstraint { let constraint = NSLayoutConstraint(item: view, attribute: attribute, relatedBy: relation, toItem: toView, attribute: attribute, multiplier: 1.0, constant: constant) constraint.priority = priority constraint.isActive = true + return constraint } // MARK: - Inits @@ -103,8 +105,8 @@ public class MoleculeStackView: ViewConstrainingView { translatesAutoresizingMaskIntoConstraints = false backgroundColor = .clear addConstrainedView(contentView) - //self.setContentHuggingPriority(UILayoutPriority.required, for: NSLayoutConstraint.Axis.vertical) - //self.setContentCompressionResistancePriority(UILayoutPriority.required, for: NSLayoutConstraint.Axis.vertical) + contentView.setContentHuggingPriority(.defaultHigh, for: .vertical) + contentView.setContentHuggingPriority(.defaultHigh, for: .horizontal) } public override func updateView(_ size: CGFloat) { @@ -119,7 +121,7 @@ public class MoleculeStackView: ViewConstrainingView { // MARK: - MVMCoreUIMoleculeViewProtocol open override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) { super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData) - MVMCoreUIStackableViewController.remove(contentView.subviews) + clear() guard let molecules = json?.arrayForKey(KeyMolecules) as? [[String: Any]] else { return @@ -127,7 +129,7 @@ public class MoleculeStackView: ViewConstrainingView { // Sets the stack attributes setAxisWithJSON(json) - spacing = json?["spacing"] as? Float ?? 16 + spacing = json?.optionalCGFloatForKey("spacing") ?? 16 // Set the alignment for the stack in the containing view. The json driven value is for the axis direction alignment. if axis == .vertical { @@ -139,16 +141,17 @@ public class MoleculeStackView: ViewConstrainingView { } // Create the molecules and set the json. - var previousObject = contentView for (index, map) in molecules.enumerated() { if let moleculeJSON = map.optionalDictionaryForKey(KeyMolecule), let molecule = MVMCoreUIMoleculeMappingObject.shared()?.createMolecule(forJSON: moleculeJSON, delegateObject: delegateObject, constrainIfNeeded: true) { - contentView.addSubview(molecule) + + addStackItem(StackItem(with: molecule, json: map), lastItem: index == molecules.count - 1) + /*contentView.addSubview(molecule) molecule.translatesAutoresizingMaskIntoConstraints = false let spacing = CGFloat(map["spacing"] as? Float ?? self.spacing) let percent = map["percent"] as? Int - let verticalAlignment = ViewConstrainingView.getAlignmentFor(json?.optionalStringForKey("verticalAlignment"), defaultAlignment: (percent == nil && axis == .vertical ? UIStackView.Alignment.fill : UIStackView.Alignment.leading)) - let horizontalAlignment = ViewConstrainingView.getAlignmentFor(json?.optionalStringForKey("horizontalAlignment"), defaultAlignment: (axis == .vertical || percent == nil ? UIStackView.Alignment.fill : UIStackView.Alignment.leading)) + let verticalAlignment = ViewConstrainingView.getAlignmentFor(map.optionalStringForKey("verticalAlignment"), defaultAlignment: (percent == nil && axis == .vertical ? UIStackView.Alignment.fill : UIStackView.Alignment.leading)) + let horizontalAlignment = ViewConstrainingView.getAlignmentFor(map.optionalStringForKey("horizontalAlignment"), defaultAlignment: (axis == .vertical || percent == nil ? UIStackView.Alignment.fill : UIStackView.Alignment.leading)) if let molecule = molecule as? MVMCoreUIViewConstrainingProtocol { molecule.alignHorizontal?(horizontalAlignment) @@ -184,6 +187,73 @@ public class MoleculeStackView: ViewConstrainingView { pinView(contentView, toView: previousObject, attribute: .bottom, relation: .equal, priority: .required, constant: 0) } else { pinView(contentView, toView: previousObject, attribute: .right, relation: .equal, priority: .required, constant: 0) + }*/ + } } } + + // MARK: - Convenience Functions + func clear() { + MVMCoreUIStackableViewController.remove(contentView.subviews) + spacingConstraints = [] + } + + func restack() { + clear() + let stackItems = items + items.removeAll() + for (index, item) in stackItems.enumerated() { + addStackItem(item, lastItem: index == stackItems.count - 1) + } + } + + /// Adds the view to the stack. + func addView(_ view: UIView, lastItem: Bool) { + addStackItem(StackItem(with: view), lastItem: lastItem) + } + + /// Adds the stack item to the stack. + func addStackItem(_ stackItem: StackItem, lastItem: Bool) { + let view = stackItem.view + contentView.addSubview(view) + view.translatesAutoresizingMaskIntoConstraints = false + + let spacing = stackItem.spacing ?? self.spacing + if let view = view as? MVMCoreUIViewConstrainingProtocol { + let verticalAlignment = stackItem.verticalAlignment ?? (stackItem.percentage == nil && axis == .vertical ? UIStackView.Alignment.fill : UIStackView.Alignment.leading) + let horizontalAlignment = stackItem.horizontalAlignment ?? view.alignment?() ?? (axis == .vertical || stackItem.percentage == nil ? UIStackView.Alignment.fill : UIStackView.Alignment.leading) + view.alignHorizontal?(horizontalAlignment) + view.alignVertical?(verticalAlignment) + } + if axis == .vertical { + if items.count == 0 { + spacingConstraints.append(pinView(view, toView: contentView, attribute: .top, relation: .equal, priority: .required, constant: spacing)) + } else if let previousView = items.last?.view { + spacingConstraints.append(NSLayoutConstraint(pinFirstView: previousView, toSecondView: view, withConstant: spacing, directionVertical: true)) + } + pinView(view, toView: contentView, attribute: .leading, relation: .equal, priority: .required, constant: 0) + pinView(contentView, toView: view, attribute: .trailing, relation: .equal, priority: .required, constant: 0) + if let percent = stackItem.percentage { + view.heightAnchor.constraint(equalTo: contentView.heightAnchor, multiplier: CGFloat(percent)/100.0).isActive = true + } + if lastItem { + pinView(contentView, toView: view, attribute: .bottom, relation: .equal, priority: .required, constant: 0) + } + } else { + if items.count == 0 { + spacingConstraints.append(pinView(view, toView: contentView, attribute: .leading, relation: .equal, priority: .required, constant: spacing)) + } else if let previousView = items.last?.view { + spacingConstraints.append(NSLayoutConstraint(pinFirstView: previousView, toSecondView: view, withConstant: spacing, directionVertical: false)) + } + pinView(view, toView: contentView, attribute: .top, relation: .equal, priority: .required, constant: 0) + pinView(contentView, toView: view, attribute: .bottom, relation: .equal, priority: .required, constant: 0) + if let percent = stackItem.percentage { + view.widthAnchor.constraint(equalTo: contentView.widthAnchor, multiplier: CGFloat(percent)/100.0).isActive = true + } + } + if lastItem { + pinView(contentView, toView: view, attribute: .right, relation: .equal, priority: .required, constant: 0) + } + items.append(stackItem) + } } diff --git a/MVMCoreUI/OtherHandlers/MVMCoreUIMoleculeMappingObject.m b/MVMCoreUI/OtherHandlers/MVMCoreUIMoleculeMappingObject.m index c70be6a5..0004027a 100644 --- a/MVMCoreUI/OtherHandlers/MVMCoreUIMoleculeMappingObject.m +++ b/MVMCoreUI/OtherHandlers/MVMCoreUIMoleculeMappingObject.m @@ -38,8 +38,7 @@ @"checkbox": MVMCoreUICheckBox.class, @"listItem": MoleculeTableViewCell.class, @"switchLineItem": SwitchLineItem.class, - @"switch": Switch.class, - @"testStack": HorizontalStackView.class + @"switch": Switch.class } mutableCopy]; }); return mapping;