Skip to content

Commit 77b882a

Browse files
committed
Updated tint and layout methods.
1 parent 5f4a019 commit 77b882a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Sources/SparrowKit/UIKit/Extensions/UIColorExtension.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ extension UIColor {
102102
*/
103103
@available(iOSApplicationExtension, unavailable)
104104
@available(tvOSApplicationExtension, unavailable)
105-
public static var tintColor: UIColor {
105+
public static var tint: UIColor {
106106
get {
107107
let value = UIApplication.shared.windows.first?.tintColor
108108
guard let tint = value else { return .systemBlue }

Sources/SparrowKit/UIKit/Extensions/UIViewExtension.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@ extension UIView {
131131
frame.setMaxX(superview.frame.width - superview.layoutMargins.right)
132132
}
133133

134+
open func setMaxYToSuperviewBottomMargin() {
135+
guard let superview = self.superview else { return }
136+
frame.setMaxY(superview.frame.height - superview.layoutMargins.bottom)
137+
}
138+
134139
/**
135140
SparrowKit: Set center X of current view to medium width of superview.
136141

0 commit comments

Comments
 (0)