Explorar o código

Expose location as part of LayoutConstraint for public access

Akiva Leffert %!s(int64=10) %!d(string=hai) anos
pai
achega
7ae143c3ac
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      Source/LayoutConstraint.swift

+ 3 - 0
Source/LayoutConstraint.swift

@@ -34,6 +34,9 @@ public class LayoutConstraint: NSLayoutConstraint {
     
     internal var snp_constraint: Constraint? = nil
     
+    public var snp_location: SourceLocation? {
+        return snp_constraint?.location
+    }
 }
 
 internal func ==(left: LayoutConstraint, right: LayoutConstraint) -> Bool {