Skip to content

Commit da1e549

Browse files
author
Baris Sencan
committed
Remove undocumented anchor property
That system will just cause confusion if finished
1 parent e68d756 commit da1e549

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

ManualLayout/CALayer+FastAccess.swift

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,6 @@
99
import Foundation
1010

1111
public extension CALayer {
12-
private var anchorKey: String { return "ManualLayout_anchor" }
13-
14-
public var anchor: CGPoint {
15-
get {
16-
if let value = objc_getAssociatedObject(self, anchorKey) as? NSValue {
17-
return value.CGPointValue()
18-
}
19-
return CGPoint(x: 0, y: 0)
20-
}
21-
set {
22-
objc_setAssociatedObject(self, anchorKey, NSValue(CGPoint: newValue), objc_AssociationPolicy(OBJC_ASSOCIATION_RETAIN))
23-
}
24-
}
2512

2613
// MARK: - Position
2714

ManualLayout/UIView+FastAccess.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ import Foundation
1111
// I wish there was an easier way to do this in Swift.
1212
public extension UIView {
1313

14-
public var anchor: CGPoint {
15-
get { return layer.anchor }
16-
set { layer.anchor = newValue }
17-
}
18-
1914
// MARK: - Position
2015

2116
public var origin: CGPoint {

0 commit comments

Comments
 (0)