We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e22389 commit 22a00c5Copy full SHA for 22a00c5
EasyPeasy/PositionAttribute+UIKit.swift
@@ -324,5 +324,29 @@ public class CenterWithinMargins: CompoundAttribute {
324
}
325
326
327
+
328
+extension Edges {
329
330
+ @available(iOS 9.0, *)
331
+ public func to(_ layoutGuide: UILayoutGuide) -> Edges {
332
+ self.attributes = [
333
+ Top().to(layoutGuide, .top),
334
+ Left().to(layoutGuide, .bottom),
335
+ Right().to(layoutGuide, .right),
336
+ Bottom().to(layoutGuide, .bottom),
337
+ ]
338
+ return self
339
+ }
340
341
+ public func to(_ view: UIView) -> Edges {
342
343
+ Top().to(view, .top),
344
+ Left().to(view, .bottom),
345
+ Right().to(view, .right),
346
+ Bottom().to(view, .bottom),
347
348
349
350
+}
351
352
#endif
0 commit comments