Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/stackview spacing #4

Merged
merged 2 commits into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions Sources/NSLayoutConstraint+Theme.swift
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
7 changes: 7 additions & 0 deletions Sources/UIKit+Theme.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
21 changes: 21 additions & 0 deletions Sources/UIStackview+Theme.swift
Original file line number Diff line number Diff line change
@@ -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