Skip to content

Commit 83ae784

Browse files
Revert "Rename from|to on inset|offset keywords"
This reverts commit 3a464be.
1 parent d029007 commit 83ae784

File tree

1 file changed

+5
-35
lines changed

1 file changed

+5
-35
lines changed

Sources/DeclarativeLayoutKit/AutoLayout/DSL/InsetOffsetRelation.swift renamed to Sources/DeclarativeLayoutKit/AutoLayout/DSL/FromToRelation.swift

Lines changed: 5 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,7 @@ import UIKit
99

1010

1111
public extension HorizontalRelativeAutoLayoutAnchorConvertible {
12-
@available(*, deprecated, renamed: "inset")
1312
func to(_ insetAnchor: NSLayoutXAxisAnchor) -> HorizontalRelativeAutoLayoutAnchor {
14-
inset(insetAnchor)
15-
}
16-
17-
@available(*, deprecated, renamed: "offset")
18-
func from(_ offsetAnchor: NSLayoutXAxisAnchor) -> HorizontalRelativeAutoLayoutAnchor {
19-
offset(offsetAnchor)
20-
}
21-
22-
func inset(_ insetAnchor: NSLayoutXAxisAnchor) -> HorizontalRelativeAutoLayoutAnchor {
2313
var copy = asHorizontalRelativeAutoLayoutAnchor()
2414

2515
copy.constant = RelativeAutoLayoutConstant(
@@ -32,7 +22,7 @@ public extension HorizontalRelativeAutoLayoutAnchorConvertible {
3222
return copy
3323
}
3424

35-
func offset(_ offsetAnchor: NSLayoutXAxisAnchor) -> HorizontalRelativeAutoLayoutAnchor {
25+
func from(_ offsetAnchor: NSLayoutXAxisAnchor) -> HorizontalRelativeAutoLayoutAnchor {
3626
var copy = asHorizontalRelativeAutoLayoutAnchor()
3727

3828
copy.constant = RelativeAutoLayoutConstant(
@@ -47,17 +37,7 @@ public extension HorizontalRelativeAutoLayoutAnchorConvertible {
4737
}
4838

4939
public extension VerticalRelativeAutoLayoutAnchorConvertible {
50-
@available(*, deprecated, renamed: "inset")
51-
func to(_ insetAnchor: NSLayoutYAxisAnchor) -> VerticalRelativeAutoLayoutAnchor {
52-
inset(insetAnchor)
53-
}
54-
55-
@available(*, deprecated, renamed: "offset")
56-
func from(_ offsetAnchor: NSLayoutYAxisAnchor) -> VerticalRelativeAutoLayoutAnchor {
57-
offset(offsetAnchor)
58-
}
59-
60-
func inset(_ anchor: NSLayoutYAxisAnchor) -> VerticalRelativeAutoLayoutAnchor {
40+
func to(_ anchor: NSLayoutYAxisAnchor) -> VerticalRelativeAutoLayoutAnchor {
6141
var copy = asVerticalRelativeAutoLayoutAnchor()
6242

6343
copy.constant = RelativeAutoLayoutConstant(
@@ -70,7 +50,7 @@ public extension VerticalRelativeAutoLayoutAnchorConvertible {
7050
return copy
7151
}
7252

73-
func offset(_ anchor: NSLayoutYAxisAnchor) -> VerticalRelativeAutoLayoutAnchor {
53+
func from(_ anchor: NSLayoutYAxisAnchor) -> VerticalRelativeAutoLayoutAnchor {
7454
var copy = asVerticalRelativeAutoLayoutAnchor()
7555

7656
copy.constant = RelativeAutoLayoutConstant(
@@ -85,17 +65,7 @@ public extension VerticalRelativeAutoLayoutAnchorConvertible {
8565
}
8666

8767
public extension BidirectionRelativeAutoLayoutAnchorConvertible {
88-
@available(*, deprecated, renamed: "inset")
89-
func to(_ insetAnchor: AutoLauoutGuide) -> BidirectionRelativeAutoLayoutAnchorConvertible {
90-
inset(insetAnchor)
91-
}
92-
93-
@available(*, deprecated, renamed: "offset")
94-
func from(_ offsetAnchor: AutoLauoutGuide) -> BidirectionRelativeAutoLayoutAnchorConvertible {
95-
offset(offsetAnchor)
96-
}
97-
98-
func inset(_ target: AutoLauoutGuide) -> BidirectionRelativeAutoLayoutAnchor {
68+
func to(_ target: AutoLauoutGuide) -> BidirectionRelativeAutoLayoutAnchor {
9969
var copy = asBidirectionalRelativeAutoLayoutAnchor()
10070

10171
copy.constant = RelativeAutoLayoutConstant(
@@ -108,7 +78,7 @@ public extension BidirectionRelativeAutoLayoutAnchorConvertible {
10878
return copy
10979
}
11080

111-
func offset(_ target: AutoLauoutGuide) -> BidirectionRelativeAutoLayoutAnchor {
81+
func from(_ target: AutoLauoutGuide) -> BidirectionRelativeAutoLayoutAnchor {
11282
var copy = asBidirectionalRelativeAutoLayoutAnchor()
11383

11484
copy.constant = RelativeAutoLayoutConstant(

0 commit comments

Comments
 (0)