@@ -837,7 +837,7 @@ public extension UIView {
837837 }
838838 constraintTypes = [ ]
839839 if types. contains ( . top) {
840- top ( to : yAnchor, offset: offset)
840+ topTo ( yAnchor, offset: offset)
841841 }
842842
843843 if types. contains ( . bottom) {
@@ -1319,12 +1319,6 @@ public extension UIView {
13191319 constraintHolder = holder
13201320 return self
13211321 }
1322- /// SwiftlyUI extension for `UIView`. Set Layout
1323- /// 这是旧接口,请使用 topTo()方法代替
1324- @discardableResult
1325- func top( to anchor: NSLayoutYAxisAnchor , offset: CGFloat = 0 ) -> Self {
1326- topTo ( anchor, offset: offset)
1327- }
13281322
13291323 /// SwiftlyUI extension for `UIView`. Set Layout
13301324 @discardableResult
@@ -1339,7 +1333,7 @@ public extension UIView {
13391333 type: . top
13401334 )
13411335 } else {
1342- top ( to : isMargins ? view. layoutMarginsGuide. topAnchor : view. topAnchor, offset: offset)
1336+ topTo ( isMargins ? view. layoutMarginsGuide. topAnchor : view. topAnchor, offset: offset)
13431337 }
13441338 return self
13451339 }
@@ -2400,6 +2394,14 @@ public extension UIView {
24002394 topTo ( view, isMargins: isMargins, offset: offset)
24012395 }
24022396
2397+ /// SwiftlyUI extension for `UIView`. Set Layout
2398+ /// 这是旧接口,请使用 topTo()方法代替
2399+ @available ( * , deprecated, message: " SwiftlyUI - Use topTo() method instead. " )
2400+ @discardableResult
2401+ func top( to anchor: NSLayoutYAxisAnchor , offset: CGFloat = 0 ) -> Self {
2402+ topTo ( anchor, offset: offset)
2403+ }
2404+
24032405 /// SwiftlyUI extension for `UIView`. Set Layout
24042406 @discardableResult
24052407 @available ( * , deprecated, message: " SwiftlyUI - Use topGreaterThanOrEqualTo instead. " )
0 commit comments