diff --git a/Cartography.xcodeproj/project.pbxproj b/Cartography.xcodeproj/project.pbxproj index 9880801..41969ff 100644 --- a/Cartography.xcodeproj/project.pbxproj +++ b/Cartography.xcodeproj/project.pbxproj @@ -728,6 +728,7 @@ ); INFOPLIST_FILE = Cartography/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.robertboehnke.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = Cartography; @@ -753,6 +754,7 @@ ); INFOPLIST_FILE = Cartography/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.robertboehnke.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = Cartography; diff --git a/Cartography/Constrain.swift b/Cartography/Constrain.swift index 29103d1..ee55147 100644 --- a/Cartography/Constrain.swift +++ b/Cartography/Constrain.swift @@ -117,8 +117,17 @@ public func constrain(views: [View], replace group: ConstraintGroup = Constraint /// public func constrain(views: [T: View], replace group: ConstraintGroup = ConstraintGroup(), @noescape block: ([T : LayoutProxy] -> ())) -> ConstraintGroup { let context = Context() - let proxies = views.map { ($0, LayoutProxy(context, $1)) } - block(Dictionary(proxies)) + + // this conflict with ObjectMapper Dictionary extension +// let proxies = views.map { ($0, LayoutProxy(context, $1)) } + + var proxies = [T : LayoutProxy]() + + for view in views { + proxies.updateValue(LayoutProxy(context, view.1), forKey: view.0) + } + + block(proxies) group.replaceConstraints(context.constraints) return group diff --git a/README.md b/README.md index c25f4ca..b3e38b2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Cartography :iphone::triangular_ruler: +## IOS 7 Support +This fork is mainly for IOS 7 support, for how to use Swift pods visit [IOS 7 Support](https://github.com/tonyli508/ForkmanForSwiftPodsWithIOS7) +