diff --git a/Sources/NSLayoutConstraint+Theme.swift b/Sources/NSLayoutConstraint+Theme.swift index 45b6ecb..8d1d862 100644 --- a/Sources/NSLayoutConstraint+Theme.swift +++ b/Sources/NSLayoutConstraint+Theme.swift @@ -1,12 +1,11 @@ // -// File.swift -// +// NSLayoutConstraint+Theme.swift +// +// Setters used by ThemePickers operating on NSLayoutConstraint. // // Created by Ryan Tan on 29/11/22. // -import Foundation - import UIKit #if os(iOS) diff --git a/Sources/UIKit+Theme.swift b/Sources/UIKit+Theme.swift index 3f72fb1..d4b6e6b 100644 --- a/Sources/UIKit+Theme.swift +++ b/Sources/UIKit+Theme.swift @@ -420,6 +420,13 @@ import UIKit set { setThemePicker(self, "setConstraintConstant:", newValue) } } } +@objc public extension UIStackView +{ + var theme_stackViewSpacing: ThemeCGFloatPicker? { + get { return getThemePicker(self, "setStackViewSpacing:") as? ThemeCGFloatPicker } + set { setThemePicker(self, "setStackViewSpacing:", newValue) } + } +} @available(iOS 13.0, *) @objc public extension UINavigationBarAppearance { diff --git a/Sources/UIStackview+Theme.swift b/Sources/UIStackview+Theme.swift new file mode 100644 index 0000000..04ba6af --- /dev/null +++ b/Sources/UIStackview+Theme.swift @@ -0,0 +1,21 @@ +// +// UIStackview+Theme.swift +// +// Setters used by ThemePickers operating on UIStackView. +// +// Created by Ryan Tan on 29/11/22. +// + +import UIKit + +#if os(iOS) +extension UIStackView { + + /// Sets spacing on stack views.. + /// + /// Triggered by SwiftTheme when theme_stackViewSpacing is used. + @objc func setStackViewSpacing(_ value: CGFloat) { + spacing = value + } +} +#endif