From 9cec048c44458f91f316605f5d8c0633e0ff8933 Mon Sep 17 00:00:00 2001 From: Martin Conte Mac Donell Date: Fri, 10 Apr 2015 21:15:40 -0700 Subject: [PATCH] @noescape on methods --- Source/ConstraintMaker.swift | 8 ++++---- Source/View+Snap.swift | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/ConstraintMaker.swift b/Source/ConstraintMaker.swift index 49e03d2..d68bc9b 100644 --- a/Source/ConstraintMaker.swift +++ b/Source/ConstraintMaker.swift @@ -61,13 +61,13 @@ public class ConstraintMaker { return constraint } - internal class func prepareConstraints(view: View, block: (make: ConstraintMaker) -> Void) -> Array { + internal class func prepareConstraints(view: View, @noescape block: (make: ConstraintMaker) -> Void) -> Array { let maker = ConstraintMaker(view: view) block(make: maker) return maker.constraints } - internal class func makeConstraints(view: View, block: (make: ConstraintMaker) -> Void) { + internal class func makeConstraints(view: View, @noescape block: (make: ConstraintMaker) -> Void) { #if os(iOS) view.setTranslatesAutoresizingMaskIntoConstraints(false) #else @@ -80,7 +80,7 @@ public class ConstraintMaker { } } - internal class func remakeConstraints(view: View, block: (make: ConstraintMaker) -> Void) { + internal class func remakeConstraints(view: View, @noescape block: (make: ConstraintMaker) -> Void) { #if os(iOS) view.setTranslatesAutoresizingMaskIntoConstraints(false) #else @@ -99,7 +99,7 @@ public class ConstraintMaker { } } - internal class func updateConstraints(view: View, block: (make: ConstraintMaker) -> Void) { + internal class func updateConstraints(view: View, @noescape block: (make: ConstraintMaker) -> Void) { #if os(iOS) view.setTranslatesAutoresizingMaskIntoConstraints(false) #else diff --git a/Source/View+Snap.swift b/Source/View+Snap.swift index 09d1bab..3d7ae28 100644 --- a/Source/View+Snap.swift +++ b/Source/View+Snap.swift @@ -68,19 +68,19 @@ public extension View { public var snp_centerWithinMargins: ConstraintItem { return ConstraintItem(object: self, attributes: ConstraintAttributes.CenterWithinMargins) } #endif - public func snp_prepareConstraints(block: (make: ConstraintMaker) -> Void) -> Array { + public func snp_prepareConstraints(@noescape block: (make: ConstraintMaker) -> Void) -> Array { return ConstraintMaker.prepareConstraints(self, block: block) } - public func snp_makeConstraints(block: (make: ConstraintMaker) -> Void) { + public func snp_makeConstraints(@noescape block: (make: ConstraintMaker) -> Void) { ConstraintMaker.makeConstraints(self, block: block) } - public func snp_updateConstraints(block: (make: ConstraintMaker) -> Void) { + public func snp_updateConstraints(@noescape block: (make: ConstraintMaker) -> Void) { ConstraintMaker.updateConstraints(self, block: block) } - public func snp_remakeConstraints(block: (make: ConstraintMaker) -> Void) { + public func snp_remakeConstraints(@noescape block: (make: ConstraintMaker) -> Void) { ConstraintMaker.remakeConstraints(self, block: block) }