undo undo
This commit is contained in:
parent
e5c0191b18
commit
26dac186dc
@ -8,9 +8,9 @@
|
|||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
@objcMembers public class HeadlineBodySwitch: ViewConstrainingView {
|
@objcMembers open class HeadlineBodySwitch: ViewConstrainingView {
|
||||||
let headlineBody = HeadlineBody(frame: .zero)
|
public let headlineBody = HeadlineBody(frame: .zero)
|
||||||
let mvmSwitch = MVMCoreUISwitch.mvmSwitchDefault()
|
public let mvmSwitch = MVMCoreUISwitch.mvmSwitchDefault()
|
||||||
|
|
||||||
// MARK: - MVMCoreViewProtocol
|
// MARK: - MVMCoreViewProtocol
|
||||||
open override func updateView(_ size: CGFloat) {
|
open override func updateView(_ size: CGFloat) {
|
||||||
@ -19,7 +19,7 @@ import UIKit
|
|||||||
mvmSwitch.updateView(size)
|
mvmSwitch.updateView(size)
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func setupView() {
|
open override func setupView() {
|
||||||
super.setupView()
|
super.setupView()
|
||||||
guard mvmSwitch.superview == nil else {
|
guard mvmSwitch.superview == nil else {
|
||||||
return
|
return
|
||||||
@ -35,24 +35,24 @@ import UIKit
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - MVMCoreUIMoleculeViewProtocol
|
// MARK: - MVMCoreUIMoleculeViewProtocol
|
||||||
public override func setWithJSON(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) {
|
open override func setWithJSON(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) {
|
||||||
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
||||||
headlineBody.setWithJSON(json?.optionalDictionaryForKey("headlineBody"), delegateObject: delegateObject, additionalData: additionalData)
|
headlineBody.setWithJSON(json?.optionalDictionaryForKey("headlineBody"), delegateObject: delegateObject, additionalData: additionalData)
|
||||||
mvmSwitch.setWithJSON(json?.optionalDictionaryForKey("switch"), delegateObject: delegateObject, additionalData: additionalData)
|
mvmSwitch.setWithJSON(json?.optionalDictionaryForKey("switch"), delegateObject: delegateObject, additionalData: additionalData)
|
||||||
}
|
}
|
||||||
|
|
||||||
public override class func estimatedHeight(forRow json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {
|
open override class func estimatedHeight(forRow json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {
|
||||||
return 30
|
return 30
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func setAsMolecule() {
|
open override func setAsMolecule() {
|
||||||
super.setAsMolecule()
|
super.setAsMolecule()
|
||||||
headlineBody.setAsMolecule()
|
headlineBody.setAsMolecule()
|
||||||
(mvmSwitch as MVMCoreUIMoleculeViewProtocol).setAsMolecule?()
|
(mvmSwitch as MVMCoreUIMoleculeViewProtocol).setAsMolecule?()
|
||||||
headlineBody.styleListItem()
|
headlineBody.styleListItem()
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func reset() {
|
open override func reset() {
|
||||||
super.reset()
|
super.reset()
|
||||||
headlineBody.reset()
|
headlineBody.reset()
|
||||||
(mvmSwitch as MVMCoreUIMoleculeViewProtocol).reset?()
|
(mvmSwitch as MVMCoreUIMoleculeViewProtocol).reset?()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user