Files
2025-10-04 08:46:46 +01:00

31 lines
645 B
Swift
Executable File

// Copyright © 2017 Schibsted. All rights reserved.
import Layout
import UIKit
final class BoxesViewController: UIViewController {
var toggled = false {
didSet {
layoutNode?.setState(["isToggled": toggled])
}
}
@IBOutlet var layoutNode: LayoutNode? {
didSet {
layoutNode?.setState(["isToggled": toggled])
}
}
@IBAction func setToggled() {
UIView.animate(withDuration: 0.4) {
self.toggled = true
}
}
@IBAction func setUntoggled() {
UIView.animate(withDuration: 0.4) {
self.toggled = false
}
}
}