From 87464050baf196947098e8d1c714144190fdf234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Kr=C3=BCger?= Date: Thu, 29 Sep 2016 11:26:46 +0200 Subject: [PATCH 1/9] [MTC] bump version number --- Manuscript-Example/Info.plist | 2 +- Sources/Info-iOS.plist | 2 +- Sources/Info-tvOS.plist | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Manuscript-Example/Info.plist b/Manuscript-Example/Info.plist index f659d33..c5383f5 100644 --- a/Manuscript-Example/Info.plist +++ b/Manuscript-Example/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.1.0 + 3.0.0 CFBundleSignature ???? CFBundleVersion diff --git a/Sources/Info-iOS.plist b/Sources/Info-iOS.plist index dca568e..e0f4bf7 100644 --- a/Sources/Info-iOS.plist +++ b/Sources/Info-iOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.1.0 + 3.0.0 CFBundleSignature ???? CFBundleVersion diff --git a/Sources/Info-tvOS.plist b/Sources/Info-tvOS.plist index dca568e..e0f4bf7 100644 --- a/Sources/Info-tvOS.plist +++ b/Sources/Info-tvOS.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.1.0 + 3.0.0 CFBundleSignature ???? CFBundleVersion From dba1672e0b22271d5a9cc11390c0d3fba46c6c3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Kr=C3=BCger?= Date: Thu, 29 Sep 2016 11:28:40 +0200 Subject: [PATCH 2/9] [MTC] adds installation instructions for Swift 2.3 to carthage --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 6e52cb3..9ddb686 100644 --- a/README.md +++ b/README.md @@ -182,6 +182,12 @@ To integrate Manuscript into your Xcode project using Carthage, specify it in yo ```ogdl github "floriankrueger/Manuscript" ``` + +If you need to support Swift 2.3 then please use the last compatible version 2.1.0 + +```ogdl +github "floriankrueger/Manuscript" == 2.1.0 +``` ### CocoaPods From 7e30c9a1e4a196908c72a291f0052abcf668db35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Kr=C3=BCger?= Date: Thu, 29 Sep 2016 11:29:46 +0200 Subject: [PATCH 3/9] [MTC] updates requirements for Xcode and Swift --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9ddb686..470d416 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,8 @@ Have a look at the [Changelog](CHANGELOG.md) for more details. ## Requirements - iOS 8.0+ -- Xcode 6.3 +- Xcode 8.x +- Swift 3 ### Bonus: Support for iOS 7.0+ and/or tvOS From 9898e5726590ca68c75a3f3d92d9923cb5b7fb75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Kr=C3=BCger?= Date: Thu, 29 Sep 2016 11:44:03 +0200 Subject: [PATCH 4/9] [MTC] migrates the code to Swift 3. should fix #5. --- Manuscript-Example/AppDelegate.swift | 14 +- .../SimpleButtonExampleViewController.swift | 74 +- .../AppIcon.appiconset/Contents.json | 20 + .../Brand Assets.launchimage/Contents.json | 21 - .../Images.xcassets/Contents.json | 6 + Manuscript-Example/MainViewController.swift | 28 +- Manuscript-iOSTests/BasicTests.swift | 2 +- Manuscript-iOSTests/ConvenienceTests.swift | 106 +- Manuscript-iOSTests/IdentifierTests.swift | 36 +- Manuscript-iOSTests/LayoutGuideTests.swift | 4 +- Manuscript-iOSTests/LayoutTests.swift | 972 +++++++++--------- Manuscript-iOSTests/PriorityTests.swift | 24 +- Manuscript-iOSTests/TargetViewTests.swift | 24 +- Manuscript-iOSTests/TestHelper.swift | 50 +- .../Manuscript_tvOSTests.swift | 2 +- Manuscript.xcodeproj/project.pbxproj | 30 +- Sources/LayoutProxy.swift | 88 +- Sources/Manuscript.swift | 16 +- 18 files changed, 764 insertions(+), 753 deletions(-) delete mode 100644 Manuscript-Example/Images.xcassets/Brand Assets.launchimage/Contents.json create mode 100644 Manuscript-Example/Images.xcassets/Contents.json diff --git a/Manuscript-Example/AppDelegate.swift b/Manuscript-Example/AppDelegate.swift index 7c4443a..8b86654 100644 --- a/Manuscript-Example/AppDelegate.swift +++ b/Manuscript-Example/AppDelegate.swift @@ -30,34 +30,34 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - self.window = UIWindow(frame:UIScreen.mainScreen().bounds) + self.window = UIWindow(frame:UIScreen.main.bounds) self.window?.rootViewController = UINavigationController(rootViewController: MainViewController()) self.window?.makeKeyAndVisible() return true } - func applicationWillResignActive(application: UIApplication) { + func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } - func applicationDidEnterBackground(application: UIApplication) { + func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - func applicationWillEnterForeground(application: UIApplication) { + func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } - func applicationDidBecomeActive(application: UIApplication) { + func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } - func applicationWillTerminate(application: UIApplication) { + func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } diff --git a/Manuscript-Example/Examples/SimpleButtonExample/SimpleButtonExampleViewController.swift b/Manuscript-Example/Examples/SimpleButtonExample/SimpleButtonExampleViewController.swift index 98a4fc4..cad60f4 100644 --- a/Manuscript-Example/Examples/SimpleButtonExample/SimpleButtonExampleViewController.swift +++ b/Manuscript-Example/Examples/SimpleButtonExample/SimpleButtonExampleViewController.swift @@ -30,21 +30,21 @@ class SimpleButtonExampleViewController: UIViewController { // MARK: Private Properties - private var activeButton: UIButton? = nil + fileprivate var activeButton: UIButton? = nil - private let optionA: UIButton = UIButton(type: .System) - private let optionB: UIButton = UIButton(type: .System) - private let optionC: UIButton = UIButton(type: .System) + fileprivate let optionA: UIButton = UIButton(type: .system) + fileprivate let optionB: UIButton = UIButton(type: .system) + fileprivate let optionC: UIButton = UIButton(type: .system) - private let buttonDimSmall:CGFloat = 60.0 - private let buttonDimBig:CGFloat = 80.0 + fileprivate let buttonDimSmall:CGFloat = 60.0 + fileprivate let buttonDimBig:CGFloat = 80.0 - private var optionAHeight: NSLayoutConstraint? = nil - private var optionAWidth: NSLayoutConstraint? = nil - private var optionBHeight: NSLayoutConstraint? = nil - private var optionBWidth: NSLayoutConstraint? = nil - private var optionCHeight: NSLayoutConstraint? = nil - private var optionCWidth: NSLayoutConstraint? = nil + fileprivate var optionAHeight: NSLayoutConstraint? = nil + fileprivate var optionAWidth: NSLayoutConstraint? = nil + fileprivate var optionBHeight: NSLayoutConstraint? = nil + fileprivate var optionBWidth: NSLayoutConstraint? = nil + fileprivate var optionCHeight: NSLayoutConstraint? = nil + fileprivate var optionCWidth: NSLayoutConstraint? = nil // MARK: - Init @@ -62,7 +62,7 @@ class SimpleButtonExampleViewController: UIViewController { override func loadView() { super.loadView() - self.view.backgroundColor = UIColor.grayColor() + self.view.backgroundColor = UIColor.gray self.setupSubviews() self.setupLayout() @@ -70,7 +70,7 @@ class SimpleButtonExampleViewController: UIViewController { // MARK: - Target - func buttonPressed(sender: UIButton) { + func buttonPressed(_ sender: UIButton) { if sender == self.activeButton { return; } @@ -113,49 +113,49 @@ class SimpleButtonExampleViewController: UIViewController { self.activeButton = sender - UIView.animateWithDuration(0.25) { + UIView.animate(withDuration: 0.25, animations: { self.view.layoutIfNeeded() - } + }) } // MARK: - Setup & Layout - private func setupSubviews() { - self.optionA.backgroundColor = UIColor.whiteColor() - self.optionA.setTitle("A", forState: .Normal) - self.optionA.addTarget(self, action: #selector(SimpleButtonExampleViewController.buttonPressed(_:)), forControlEvents: .TouchUpInside) + fileprivate func setupSubviews() { + self.optionA.backgroundColor = UIColor.white + self.optionA.setTitle("A", for: UIControlState()) + self.optionA.addTarget(self, action: #selector(SimpleButtonExampleViewController.buttonPressed(_:)), for: .touchUpInside) self.view.addSubview(self.optionA) - self.optionB.backgroundColor = UIColor.whiteColor() - self.optionB.setTitle("B", forState: .Normal) - self.optionB.addTarget(self, action: #selector(SimpleButtonExampleViewController.buttonPressed(_:)), forControlEvents: .TouchUpInside) + self.optionB.backgroundColor = UIColor.white + self.optionB.setTitle("B", for: UIControlState()) + self.optionB.addTarget(self, action: #selector(SimpleButtonExampleViewController.buttonPressed(_:)), for: .touchUpInside) self.view.addSubview(self.optionB) - self.optionC.backgroundColor = UIColor.whiteColor() - self.optionC.setTitle("C", forState: .Normal) - self.optionC.addTarget(self, action: #selector(SimpleButtonExampleViewController.buttonPressed(_:)), forControlEvents: .TouchUpInside) + self.optionC.backgroundColor = UIColor.white + self.optionC.setTitle("C", for: UIControlState()) + self.optionC.addTarget(self, action: #selector(SimpleButtonExampleViewController.buttonPressed(_:)), for: .touchUpInside) self.view.addSubview(self.optionC) } - private func setupLayout() { + fileprivate func setupLayout() { Manuscript.layout(self.optionA) { c in - self.optionAHeight = c.set(.Height, to:self.buttonDimSmall).constraint - self.optionAWidth = c.set(.Width, to:self.buttonDimSmall).constraint - c.make(.Right, equalTo:self.optionB, s:.Left, minus: 10.0) - c.make(.CenterY, equalTo:self.view, s:.CenterY) + self.optionAHeight = c.set(.height, to:self.buttonDimSmall).constraint + self.optionAWidth = c.set(.width, to:self.buttonDimSmall).constraint + c.make(.right, equalTo:self.optionB, s:.left, minus: 10.0) + c.make(.centerY, equalTo:self.view, s:.centerY) } Manuscript.layout(self.optionB) { c in - self.optionBHeight = c.set(.Height, to:self.buttonDimSmall).constraint - self.optionBWidth = c.set(.Width, to:self.buttonDimSmall).constraint + self.optionBHeight = c.set(.height, to:self.buttonDimSmall).constraint + self.optionBWidth = c.set(.width, to:self.buttonDimSmall).constraint c.centerIn(self.view) } Manuscript.layout(self.optionC) { c in - self.optionCHeight = c.set(.Height, to:self.buttonDimSmall).constraint - self.optionCWidth = c.set(.Width, to:self.buttonDimSmall).constraint - c.make(.Left, equalTo:self.optionB, s:.Right, plus: 10.0) - c.make(.CenterY, equalTo:self.view, s:.CenterY) + self.optionCHeight = c.set(.height, to:self.buttonDimSmall).constraint + self.optionCWidth = c.set(.width, to:self.buttonDimSmall).constraint + c.make(.left, equalTo:self.optionB, s:.right, plus: 10.0) + c.make(.centerY, equalTo:self.view, s:.centerY) } } diff --git a/Manuscript-Example/Images.xcassets/AppIcon.appiconset/Contents.json b/Manuscript-Example/Images.xcassets/AppIcon.appiconset/Contents.json index eeea76c..1d060ed 100644 --- a/Manuscript-Example/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/Manuscript-Example/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "29x29", @@ -30,6 +40,16 @@ "size" : "60x60", "scale" : "3x" }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, { "idiom" : "ipad", "size" : "29x29", diff --git a/Manuscript-Example/Images.xcassets/Brand Assets.launchimage/Contents.json b/Manuscript-Example/Images.xcassets/Brand Assets.launchimage/Contents.json deleted file mode 100644 index e37b649..0000000 --- a/Manuscript-Example/Images.xcassets/Brand Assets.launchimage/Contents.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "images" : [ - { - "orientation" : "portrait", - "idiom" : "iphone", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "minimum-system-version" : "7.0", - "subtype" : "retina4", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Manuscript-Example/Images.xcassets/Contents.json b/Manuscript-Example/Images.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Manuscript-Example/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Manuscript-Example/MainViewController.swift b/Manuscript-Example/MainViewController.swift index ff79d47..0de516d 100644 --- a/Manuscript-Example/MainViewController.swift +++ b/Manuscript-Example/MainViewController.swift @@ -40,8 +40,8 @@ class MainViewController: UIViewController, UITableViewDelegate, UITableViewData // MARK: Private Properties - private let tableView = UITableView(frame: CGRectZero, style: .Plain) - private let menuItems: [Int:MainMenuItem] = [ + fileprivate let tableView = UITableView(frame: CGRect.zero, style: .plain) + fileprivate let menuItems: [Int:MainMenuItem] = [ 0:MainMenuItem( title: "Simple Button Example", createController: { return SimpleButtonExampleViewController() }, @@ -67,33 +67,33 @@ class MainViewController: UIViewController, UITableViewDelegate, UITableViewData self.setupLayout() } - override func viewDidAppear(animated: Bool) { + override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) if let selectedIndexPath = self.tableView.indexPathForSelectedRow { - self.tableView.deselectRowAtIndexPath(selectedIndexPath, animated: animated) + self.tableView.deselectRow(at: selectedIndexPath, animated: animated) } } // MARK: - UITableViewDelegate - func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) { - if let menuItem = menuItems[indexPath.row] { + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + if let menuItem = menuItems[(indexPath as NSIndexPath).row] { self.navigationController?.pushViewController(menuItem.createController(), animated: true) } } // MARK: - UITableViewDataSource - func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return self.menuItems.count } - func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { - if let cell = tableView.dequeueReusableCellWithIdentifier(menuItemCellIdentifier) { - if let menuItem = menuItems[indexPath.row] { + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + if let cell = tableView.dequeueReusableCell(withIdentifier: menuItemCellIdentifier) { + if let menuItem = menuItems[(indexPath as NSIndexPath).row] { cell.textLabel?.text = menuItem.title - cell.accessoryType = .DisclosureIndicator + cell.accessoryType = .disclosureIndicator } return cell } @@ -102,14 +102,14 @@ class MainViewController: UIViewController, UITableViewDelegate, UITableViewData // MARK: - Setup & Layout - private func setupSubviews() { - self.tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: menuItemCellIdentifier) + fileprivate func setupSubviews() { + self.tableView.register(UITableViewCell.self, forCellReuseIdentifier: menuItemCellIdentifier) self.tableView.delegate = self self.tableView.dataSource = self self.view.addSubview(self.tableView) } - private func setupLayout() { + fileprivate func setupLayout() { Manuscript.layout(self.tableView) { c in c.alignAllEdges(to: self.view) } diff --git a/Manuscript-iOSTests/BasicTests.swift b/Manuscript-iOSTests/BasicTests.swift index 8156398..1f46b7e 100644 --- a/Manuscript-iOSTests/BasicTests.swift +++ b/Manuscript-iOSTests/BasicTests.swift @@ -30,7 +30,7 @@ import Manuscript class BasicTests: XCTestCase { func testStopsTranslatingAutoresizingMasks() { - let view = UIView(frame: CGRectZero) + let view = UIView(frame: CGRect.zero) XCTAssertTrue(view.translatesAutoresizingMaskIntoConstraints, "Expected `translatesAutoresizingMaskIntoConstraints` to be `true` by default") diff --git a/Manuscript-iOSTests/ConvenienceTests.swift b/Manuscript-iOSTests/ConvenienceTests.swift index aa03f63..b25ba6a 100644 --- a/Manuscript-iOSTests/ConvenienceTests.swift +++ b/Manuscript-iOSTests/ConvenienceTests.swift @@ -30,20 +30,20 @@ import Manuscript class ConvenienceTests: XCTestCase { func testAlignAllEdges() { - let parentView = UIView(frame: CGRectZero) - let childView = UIView(frame: CGRectZero) + let parentView = UIView(frame: CGRect.zero) + let childView = UIView(frame: CGRect.zero) parentView.addSubview(childView) - let expectation = self.expectationWithDescription("constraints installed") + let expectation = self.expectation(description: "constraints installed") Manuscript.layout(childView) { c in c.alignAllEdges(to: parentView) expectation.fulfill() } - self.waitForExpectationsWithTimeout(0.1) { error in - for attribute in [NSLayoutAttribute.Left, NSLayoutAttribute.Right, NSLayoutAttribute.Top, NSLayoutAttribute.Bottom] { + self.waitForExpectations(timeout: 0.1) { error in + for attribute in [NSLayoutAttribute.left, NSLayoutAttribute.right, NSLayoutAttribute.top, NSLayoutAttribute.bottom] { if let constraint = Helper.firstConstraint(parentView, withAttribute:attribute) { - Helper.checkConstraint(constraint, item:childView, attribute:attribute, relation:.Equal, relatedItem:parentView, relatedAttribute:attribute, constant:0.0) + Helper.checkConstraint(constraint, item:childView, attribute:attribute, relation:.equal, relatedItem:parentView, relatedAttribute:attribute, constant:0.0) } else { XCTFail("view is expected to have one constraint for \(attribute)") } @@ -55,34 +55,34 @@ class ConvenienceTests: XCTestCase { } func testAlignAllEdgesWithInsets() { - let parentView = UIView(frame: CGRectZero) - let childView = UIView(frame: CGRectZero) + let parentView = UIView(frame: CGRect.zero) + let childView = UIView(frame: CGRect.zero) parentView.addSubview(childView) let insets = UIEdgeInsets(top: 1.0, left: 2.0, bottom: 3.0, right: 4.0) - let expectation = self.expectationWithDescription("constraints installed") + let expectation = self.expectation(description: "constraints installed") Manuscript.layout(childView) { c in c.alignAllEdges(to: parentView, withInsets: insets) expectation.fulfill() } - self.waitForExpectationsWithTimeout(0.1) { error in - for attribute in [NSLayoutAttribute.Left, NSLayoutAttribute.Right, NSLayoutAttribute.Top, NSLayoutAttribute.Bottom] { + self.waitForExpectations(timeout: 0.1) { error in + for attribute in [NSLayoutAttribute.left, NSLayoutAttribute.right, NSLayoutAttribute.top, NSLayoutAttribute.bottom] { if let constraint = Helper.firstConstraint(parentView, withAttribute:attribute) { let constant: CGFloat switch attribute { - case .Left: + case .left: constant = insets.left - case .Right: + case .right: constant = -1 * insets.right - case .Top: + case .top: constant = insets.top - case .Bottom: + case .bottom: constant = -1 * insets.bottom default: constant = 0.0 } - Helper.checkConstraint(constraint, item:childView, attribute:attribute, relation:.Equal, relatedItem:parentView, relatedAttribute:attribute, constant:constant) + Helper.checkConstraint(constraint, item:childView, attribute:attribute, relation:.equal, relatedItem:parentView, relatedAttribute:attribute, constant:constant) } else { XCTFail("view is expected to have one constraint for \(attribute)") } @@ -94,20 +94,20 @@ class ConvenienceTests: XCTestCase { } func testCenterIn() { - let parentView = UIView(frame: CGRectZero) - let childView = UIView(frame: CGRectZero) + let parentView = UIView(frame: CGRect.zero) + let childView = UIView(frame: CGRect.zero) parentView.addSubview(childView) - let expectation = self.expectationWithDescription("constraints installed") + let expectation = self.expectation(description: "constraints installed") Manuscript.layout(childView) { c in c.centerIn(parentView) expectation.fulfill() } - self.waitForExpectationsWithTimeout(0.1) { error in - for attribute in [NSLayoutAttribute.CenterX, NSLayoutAttribute.CenterY] { + self.waitForExpectations(timeout: 0.1) { error in + for attribute in [NSLayoutAttribute.centerX, NSLayoutAttribute.centerY] { if let constraint = Helper.firstConstraint(parentView, withAttribute:attribute) { - Helper.checkConstraint(constraint, item:childView, attribute:attribute, relation:.Equal, relatedItem:parentView, relatedAttribute:attribute, constant:0.0) + Helper.checkConstraint(constraint, item:childView, attribute:attribute, relation:.equal, relatedItem:parentView, relatedAttribute:attribute, constant:0.0) } else { XCTFail("view is expected to have one constraint for \(attribute)") } @@ -119,29 +119,29 @@ class ConvenienceTests: XCTestCase { } func testSetSize() { - let view = UIView(frame: CGRectZero) + let view = UIView(frame: CGRect.zero) let width:CGFloat = 100.0 let height:CGFloat = 200.0 - let expectation = self.expectationWithDescription("constraints installed") + let expectation = self.expectation(description: "constraints installed") Manuscript.layout(view) { c in c.setSize(CGSize(width: width, height: height)) expectation.fulfill() } - self.waitForExpectationsWithTimeout(0.1) { error in - for attribute in [NSLayoutAttribute.Width, NSLayoutAttribute.Height] { + self.waitForExpectations(timeout: 0.1) { error in + for attribute in [NSLayoutAttribute.width, NSLayoutAttribute.height] { if let constraint = Helper.firstConstraint(view, withAttribute:attribute) { let constant: CGFloat switch attribute { - case .Width: + case .width: constant = width - case .Height: + case .height: constant = height default: constant = 0.0 } - Helper.checkConstraint(constraint, item:view, attribute:attribute, relation:.Equal, constant:constant) + Helper.checkConstraint(constraint, item:view, attribute:attribute, relation:.equal, constant:constant) } else { XCTFail("view is expected to have one constraint for \(attribute)") } @@ -152,19 +152,19 @@ class ConvenienceTests: XCTestCase { } func testHorizontalHairlineOnRetina() { - let view = UIView(frame: CGRectZero) - let expectation = self.expectationWithDescription("constraints installed") + let view = UIView(frame: CGRect.zero) + let expectation = self.expectation(description: "constraints installed") Manuscript.layout(view, utils: RetinaUtils()) { c in c.makeHorizontalHairline() expectation.fulfill() } - self.waitForExpectationsWithTimeout(0.1) { error in - if let constraint = Helper.firstConstraint(view, withAttribute:.Height) { - Helper.checkConstraint(constraint, item:view, attribute:.Height, relation:.Equal, constant:0.5) + self.waitForExpectations(timeout: 0.1) { error in + if let constraint = Helper.firstConstraint(view, withAttribute:.height) { + Helper.checkConstraint(constraint, item:view, attribute:.height, relation:.equal, constant:0.5) } else { - XCTFail("view is expected to have one constraint for \(NSLayoutAttribute.Height)") + XCTFail("view is expected to have one constraint for \(NSLayoutAttribute.height)") } XCTAssertEqual(1, view.constraints.count, "view is expected to have one constraint") XCTAssertNil(error, "") @@ -172,19 +172,19 @@ class ConvenienceTests: XCTestCase { } func testHorizontalHairlineOnNonRetina() { - let view = UIView(frame: CGRectZero) - let expectation = self.expectationWithDescription("constraints installed") + let view = UIView(frame: CGRect.zero) + let expectation = self.expectation(description: "constraints installed") Manuscript.layout(view, utils: NonRetinaUtils()) { c in c.makeHorizontalHairline() expectation.fulfill() } - self.waitForExpectationsWithTimeout(0.1) { error in - if let constraint = Helper.firstConstraint(view, withAttribute:.Height) { - Helper.checkConstraint(constraint, item:view, attribute:.Height, relation:.Equal, constant:1.0) + self.waitForExpectations(timeout: 0.1) { error in + if let constraint = Helper.firstConstraint(view, withAttribute:.height) { + Helper.checkConstraint(constraint, item:view, attribute:.height, relation:.equal, constant:1.0) } else { - XCTFail("view is expected to have one constraint for \(NSLayoutAttribute.Height)") + XCTFail("view is expected to have one constraint for \(NSLayoutAttribute.height)") } XCTAssertEqual(1, view.constraints.count, "view is expected to have one constraint") XCTAssertNil(error, "") @@ -192,19 +192,19 @@ class ConvenienceTests: XCTestCase { } func testVerticalHairlineOnRetina() { - let view = UIView(frame: CGRectZero) - let expectation = self.expectationWithDescription("constraints installed") + let view = UIView(frame: CGRect.zero) + let expectation = self.expectation(description: "constraints installed") Manuscript.layout(view, utils: RetinaUtils()) { c in c.makeVerticalHairline() expectation.fulfill() } - self.waitForExpectationsWithTimeout(0.1) { error in - if let constraint = Helper.firstConstraint(view, withAttribute:.Width) { - Helper.checkConstraint(constraint, item:view, attribute:.Width, relation:.Equal, constant:0.5) + self.waitForExpectations(timeout: 0.1) { error in + if let constraint = Helper.firstConstraint(view, withAttribute:.width) { + Helper.checkConstraint(constraint, item:view, attribute:.width, relation:.equal, constant:0.5) } else { - XCTFail("view is expected to have one constraint for \(NSLayoutAttribute.Width)") + XCTFail("view is expected to have one constraint for \(NSLayoutAttribute.width)") } XCTAssertEqual(1, view.constraints.count, "view is expected to have one constraint") XCTAssertNil(error, "") @@ -212,19 +212,19 @@ class ConvenienceTests: XCTestCase { } func testVerticalHairlineOnNonRetina() { - let view = UIView(frame: CGRectZero) - let expectation = self.expectationWithDescription("constraints installed") + let view = UIView(frame: CGRect.zero) + let expectation = self.expectation(description: "constraints installed") Manuscript.layout(view, utils: NonRetinaUtils()) { c in c.makeVerticalHairline() expectation.fulfill() } - self.waitForExpectationsWithTimeout(0.1) { error in - if let constraint = Helper.firstConstraint(view, withAttribute:.Width) { - Helper.checkConstraint(constraint, item:view, attribute:.Width, relation:.Equal, constant:1.0) + self.waitForExpectations(timeout: 0.1) { error in + if let constraint = Helper.firstConstraint(view, withAttribute:.width) { + Helper.checkConstraint(constraint, item:view, attribute:.width, relation:.equal, constant:1.0) } else { - XCTFail("view is expected to have one constraint for \(NSLayoutAttribute.Width)") + XCTFail("view is expected to have one constraint for \(NSLayoutAttribute.width)") } XCTAssertEqual(1, view.constraints.count, "view is expected to have one constraint") XCTAssertNil(error, "") diff --git a/Manuscript-iOSTests/IdentifierTests.swift b/Manuscript-iOSTests/IdentifierTests.swift index 7046b83..7cac2db 100644 --- a/Manuscript-iOSTests/IdentifierTests.swift +++ b/Manuscript-iOSTests/IdentifierTests.swift @@ -11,11 +11,11 @@ import Manuscript class IdentifierTests: XCTestCase { - private var view: UIView = UIView(frame: CGRectZero) + fileprivate var view: UIView = UIView(frame: CGRect.zero) override func setUp() { super.setUp() - self.view = UIView(frame: CGRectZero) + self.view = UIView(frame: CGRect.zero) } override func tearDown() { @@ -27,7 +27,7 @@ class IdentifierTests: XCTestCase { var layoutItem: LayoutItem? = nil Manuscript.layout(self.view) { c in - layoutItem = c.set(.Width, to: 100.0) + layoutItem = c.set(.width, to: 100.0) } XCTAssertEqual(layoutItem!.constraint.identifier, "MNSCRPT", "Expected a default identifier: 'MNSCRPT'") @@ -39,7 +39,7 @@ class IdentifierTests: XCTestCase { Manuscript.layout(self.view) { c in c.setPriority(123) - layoutItem = c.set(.Width, to: 100.0, identifier: identifier) + layoutItem = c.set(.width, to: 100.0, identifier: identifier) } XCTAssertEqual(layoutItem!.constraint.identifier, identifier, "Expected a custom identifier: '\(identifier)'") @@ -53,11 +53,11 @@ class IdentifierTests: XCTestCase { self.convenienceIdentifiersAlignAllEdgesWithPrefix("CUSTOM_IDENTIFIER") } - func convenienceIdentifiersAlignAllEdgesWithPrefix(prefix: String?) { - let parentView = UIView(frame: CGRectZero) - let childView = UIView(frame: CGRectZero) + func convenienceIdentifiersAlignAllEdgesWithPrefix(_ prefix: String?) { + let parentView = UIView(frame: CGRect.zero) + let childView = UIView(frame: CGRect.zero) parentView.addSubview(childView) - let expectation = self.expectationWithDescription("constraints installed") + let expectation = self.expectation(description: "constraints installed") var layoutItems: [LayoutItem]? = nil @@ -68,7 +68,7 @@ class IdentifierTests: XCTestCase { let checkPrefix = prefix ?? Manuscript.defaultIdentifier - self.waitForExpectationsWithTimeout(0.1) { error in + self.waitForExpectations(timeout: 0.1) { error in guard let items = layoutItems else { XCTFail("layoutItems must not be nil"); return } XCTAssertEqual(items[0].constraint.identifier, "\(checkPrefix)_left") XCTAssertEqual(items[1].constraint.identifier, "\(checkPrefix)_top") @@ -86,11 +86,11 @@ class IdentifierTests: XCTestCase { self.convenienceIdentifiersCenterInWithPrefix("CUSTOM_IDENTIFIER") } - func convenienceIdentifiersCenterInWithPrefix(prefix: String?) { - let parentView = UIView(frame: CGRectZero) - let childView = UIView(frame: CGRectZero) + func convenienceIdentifiersCenterInWithPrefix(_ prefix: String?) { + let parentView = UIView(frame: CGRect.zero) + let childView = UIView(frame: CGRect.zero) parentView.addSubview(childView) - let expectation = self.expectationWithDescription("constraints installed") + let expectation = self.expectation(description: "constraints installed") var layoutItems: [LayoutItem]? = nil @@ -101,7 +101,7 @@ class IdentifierTests: XCTestCase { let checkPrefix = prefix ?? Manuscript.defaultIdentifier - self.waitForExpectationsWithTimeout(0.1) { error in + self.waitForExpectations(timeout: 0.1) { error in guard let items = layoutItems else { XCTFail("layoutItems must not be nil"); return } XCTAssertEqual(items[0].constraint.identifier, "\(checkPrefix)_center_x") XCTAssertEqual(items[1].constraint.identifier, "\(checkPrefix)_center_y") @@ -117,11 +117,11 @@ class IdentifierTests: XCTestCase { self.convenienceIdentifiersSetSizeWithPrefix("CUSTOM_IDENTIFIER") } - func convenienceIdentifiersSetSizeWithPrefix(prefix: String?) { - let view = UIView(frame: CGRectZero) + func convenienceIdentifiersSetSizeWithPrefix(_ prefix: String?) { + let view = UIView(frame: CGRect.zero) let width:CGFloat = 100.0 let height:CGFloat = 200.0 - let expectation = self.expectationWithDescription("constraints installed") + let expectation = self.expectation(description: "constraints installed") var layoutItems: [LayoutItem]? = nil @@ -132,7 +132,7 @@ class IdentifierTests: XCTestCase { let checkPrefix = prefix ?? Manuscript.defaultIdentifier - self.waitForExpectationsWithTimeout(0.1) { error in + self.waitForExpectations(timeout: 0.1) { error in guard let items = layoutItems else { XCTFail("layoutItems must not be nil"); return } XCTAssertEqual(items[0].constraint.identifier, "\(checkPrefix)_height") XCTAssertEqual(items[1].constraint.identifier, "\(checkPrefix)_width") diff --git a/Manuscript-iOSTests/LayoutGuideTests.swift b/Manuscript-iOSTests/LayoutGuideTests.swift index 0fe2218..8d0d1e7 100644 --- a/Manuscript-iOSTests/LayoutGuideTests.swift +++ b/Manuscript-iOSTests/LayoutGuideTests.swift @@ -15,7 +15,7 @@ class LayoutGuideTests : XCTestCase { func testCreateConstraintWithLayoutGuide() { let viewController = UIViewController(nibName: nil, bundle: nil) - let aView = UIView(frame: CGRectZero) + let aView = UIView(frame: CGRect.zero) viewController.view.addSubview(aView) var topLayoutItem: LayoutItem? = nil @@ -23,7 +23,7 @@ class LayoutGuideTests : XCTestCase { // make Layout Constraints Manuscript.layout(aView) { c in - topLayoutItem = c.make(.Top, equalTo: viewController.topLayoutGuide, s: .LastBaseline, plus: 10.0) + topLayoutItem = c.make(.top, equalTo: viewController.topLayoutGuide, s: .lastBaseline, plus: 10.0) } XCTAssertNotNil(topLayoutItem) diff --git a/Manuscript-iOSTests/LayoutTests.swift b/Manuscript-iOSTests/LayoutTests.swift index 248c5ab..628e903 100644 --- a/Manuscript-iOSTests/LayoutTests.swift +++ b/Manuscript-iOSTests/LayoutTests.swift @@ -31,25 +31,25 @@ class LayoutTests: XCTestCase { // MARK: - Tests: SET/EQUAL - func meta_testSet(attribute: NSLayoutAttribute, relation: NSLayoutRelation = .Equal) { + func meta_testSet(_ attribute: NSLayoutAttribute, relation: NSLayoutRelation = .equal) { let constant = Helper.randomFloat(max: 100.0) - let view = UIView(frame: CGRectZero) - let expectation = self.expectationWithDescription("constraints installed") + let view = UIView(frame: CGRect.zero) + let expectation = self.expectation(description: "constraints installed") Manuscript.layout(view) { c in switch relation { - case .LessThanOrEqual: + case .lessThanOrEqual: c.set(attribute, toLessThan:constant) - case .Equal: + case .equal: c.set(attribute, to:constant) - case .GreaterThanOrEqual: + case .greaterThanOrEqual: c.set(attribute, toMoreThan:constant) } expectation.fulfill() } - self.waitForExpectationsWithTimeout(0.1) { error in + self.waitForExpectations(timeout: 0.1) { error in if let constraint = Helper.firstConstraint(view) { Helper.checkConstraint(constraint, item:view, attribute:attribute, relation:relation, constant:constant) } else { @@ -61,60 +61,60 @@ class LayoutTests: XCTestCase { } func testSetWidth() { - meta_testSet(.Width) + meta_testSet(.width) } func testSetHeight() { - meta_testSet(.Height) + meta_testSet(.height) } func testSetGreaterThanWidth() { - meta_testSet(.Width, relation:.GreaterThanOrEqual) + meta_testSet(.width, relation:.greaterThanOrEqual) } func testSetGreaterThanHeight() { - meta_testSet(.Height, relation:.GreaterThanOrEqual) + meta_testSet(.height, relation:.greaterThanOrEqual) } func testSetLessThanWidth() { - meta_testSet(.Width, relation:.LessThanOrEqual) + meta_testSet(.width, relation:.lessThanOrEqual) } func testSetLessThanHeight() { - meta_testSet(.Height, relation:.LessThanOrEqual) + meta_testSet(.height, relation:.lessThanOrEqual) } // MARK: - Tests: MAKE/EQUAL - func meta_testMake(attribute: NSLayoutAttribute, relation: NSLayoutRelation, relatedAttribute: NSLayoutAttribute, useTargetView: Bool) { + func meta_testMake(_ attribute: NSLayoutAttribute, relation: NSLayoutRelation, relatedAttribute: NSLayoutAttribute, useTargetView: Bool) { let constant = Helper.randomFloat(max: 100.0) let multiplier = Helper.randomFloat(max: 2.0) - let parentView = UIView(frame: CGRectZero) - let childView = UIView(frame: CGRectZero) + let parentView = UIView(frame: CGRect.zero) + let childView = UIView(frame: CGRect.zero) parentView.addSubview(childView) - let expectation = self.expectationWithDescription("constraints installed") + let expectation = self.expectation(description: "constraints installed") Manuscript.layout(childView) { c in switch (relation, useTargetView) { - case (.Equal, true): + case (.equal, true): c.make(attribute, equalTo:parentView, s:relatedAttribute, times:multiplier, plus:constant, on:parentView) - case (.Equal, false): + case (.equal, false): c.make(attribute, equalTo:parentView, s:relatedAttribute, times:multiplier, plus:constant) - case (.GreaterThanOrEqual, true): + case (.greaterThanOrEqual, true): c.make(attribute, greaterThan:parentView, s:relatedAttribute, times:multiplier, plus:constant, on:parentView) - case (.GreaterThanOrEqual, false): + case (.greaterThanOrEqual, false): c.make(attribute, greaterThan:parentView, s:relatedAttribute, times:multiplier, plus:constant) - case (.LessThanOrEqual, true): + case (.lessThanOrEqual, true): c.make(attribute, lessThan:parentView, s:relatedAttribute, times:multiplier, plus:constant, on:parentView) - case (.LessThanOrEqual, false): + case (.lessThanOrEqual, false): c.make(attribute, lessThan:parentView, s:relatedAttribute, times:multiplier, plus:constant) } expectation.fulfill() } - self.waitForExpectationsWithTimeout(0.1) { error in + self.waitForExpectations(timeout: 0.1) { error in if let constraint = Helper.firstConstraint(parentView, withAttribute:attribute) { Helper.checkConstraint(constraint, item:childView, attribute:attribute, relation:relation, relatedItem:parentView, relatedAttribute:relatedAttribute, multiplier:multiplier, constant:constant) } else { @@ -127,1237 +127,1237 @@ class LayoutTests: XCTestCase { } func testMakeWidthEqualWidth() { - meta_testMake(.Width, relation:.Equal, relatedAttribute:.Width, useTargetView:false) + meta_testMake(.width, relation:.equal, relatedAttribute:.width, useTargetView:false) } func testMakeWidthEqualWidthOnTargetView() { - meta_testMake(.Width, relation:.Equal, relatedAttribute:.Width, useTargetView:true) + meta_testMake(.width, relation:.equal, relatedAttribute:.width, useTargetView:true) } func testMakeWidthEqualHeight() { - meta_testMake(.Width, relation:.Equal, relatedAttribute:.Height, useTargetView:false) + meta_testMake(.width, relation:.equal, relatedAttribute:.height, useTargetView:false) } func testMakeWidthEqualHeightOnTargetView() { - meta_testMake(.Width, relation:.Equal, relatedAttribute:.Height, useTargetView:true) + meta_testMake(.width, relation:.equal, relatedAttribute:.height, useTargetView:true) } func testMakeLeftEqualLeft() { - meta_testMake(.Left, relation:.Equal, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.left, relation:.equal, relatedAttribute:.left, useTargetView:false) } func testMakeLeftEqualLeftOnTargetView() { - meta_testMake(.Left, relation:.Equal, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.left, relation:.equal, relatedAttribute:.left, useTargetView:true) } func testMakeLeftEqualRight() { - meta_testMake(.Left, relation:.Equal, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.left, relation:.equal, relatedAttribute:.right, useTargetView:false) } func testMakeLeftEqualRightOnTargetView() { - meta_testMake(.Left, relation:.Equal, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.left, relation:.equal, relatedAttribute:.right, useTargetView:true) } func testMakeLeftEqualTop() { - meta_testMake(.Left, relation:.Equal, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.left, relation:.equal, relatedAttribute:.top, useTargetView:false) } func testMakeLeftEqualTopOnTargetView() { - meta_testMake(.Left, relation:.Equal, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.left, relation:.equal, relatedAttribute:.top, useTargetView:true) } func testMakeLeftEqualBottom() { - meta_testMake(.Left, relation:.Equal, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.left, relation:.equal, relatedAttribute:.bottom, useTargetView:false) } func testMakeLeftEqualBottomOnTargetView() { - meta_testMake(.Left, relation:.Equal, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.left, relation:.equal, relatedAttribute:.bottom, useTargetView:true) } func testMakeLeftEqualCenterX() { - meta_testMake(.Left, relation:.Equal, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.left, relation:.equal, relatedAttribute:.centerX, useTargetView:false) } func testMakeLeftEqualCenterXOnTargetView() { - meta_testMake(.Left, relation:.Equal, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.left, relation:.equal, relatedAttribute:.centerX, useTargetView:true) } func testMakeLeftEqualCenterY() { - meta_testMake(.Left, relation:.Equal, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.left, relation:.equal, relatedAttribute:.centerY, useTargetView:false) } func testMakeLeftEqualCenterYOnTargetView() { - meta_testMake(.Left, relation:.Equal, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.left, relation:.equal, relatedAttribute:.centerY, useTargetView:true) } func testMakeLeftEqualBaseline() { - meta_testMake(.Left, relation:.Equal, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.left, relation:.equal, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeLeftEqualBaselineOnTargetView() { - meta_testMake(.Left, relation:.Equal, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.left, relation:.equal, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeRightEqualLeft() { - meta_testMake(.Right, relation:.Equal, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.right, relation:.equal, relatedAttribute:.left, useTargetView:false) } func testMakeRightEqualLeftOnTargetView() { - meta_testMake(.Right, relation:.Equal, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.right, relation:.equal, relatedAttribute:.left, useTargetView:true) } func testMakeRightEqualRight() { - meta_testMake(.Right, relation:.Equal, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.right, relation:.equal, relatedAttribute:.right, useTargetView:false) } func testMakeRightEqualRightOnTargetView() { - meta_testMake(.Right, relation:.Equal, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.right, relation:.equal, relatedAttribute:.right, useTargetView:true) } func testMakeRightEqualTop() { - meta_testMake(.Right, relation:.Equal, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.right, relation:.equal, relatedAttribute:.top, useTargetView:false) } func testMakeRightEqualTopOnTargetView() { - meta_testMake(.Right, relation:.Equal, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.right, relation:.equal, relatedAttribute:.top, useTargetView:true) } func testMakeRightEqualBottom() { - meta_testMake(.Right, relation:.Equal, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.right, relation:.equal, relatedAttribute:.bottom, useTargetView:false) } func testMakeRightEqualBottomOnTargetView() { - meta_testMake(.Right, relation:.Equal, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.right, relation:.equal, relatedAttribute:.bottom, useTargetView:true) } func testMakeRightEqualCenterX() { - meta_testMake(.Right, relation:.Equal, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.right, relation:.equal, relatedAttribute:.centerX, useTargetView:false) } func testMakeRightEqualCenterXOnTargetView() { - meta_testMake(.Right, relation:.Equal, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.right, relation:.equal, relatedAttribute:.centerX, useTargetView:true) } func testMakeRightEqualCenterY() { - meta_testMake(.Right, relation:.Equal, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.right, relation:.equal, relatedAttribute:.centerY, useTargetView:false) } func testMakeRightEqualCenterYOnTargetView() { - meta_testMake(.Right, relation:.Equal, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.right, relation:.equal, relatedAttribute:.centerY, useTargetView:true) } func testMakeRightEqualBaseline() { - meta_testMake(.Right, relation:.Equal, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.right, relation:.equal, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeRightEqualBaselineOnTargetView() { - meta_testMake(.Right, relation:.Equal, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.right, relation:.equal, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeTopEqualLeft() { - meta_testMake(.Top, relation:.Equal, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.top, relation:.equal, relatedAttribute:.left, useTargetView:false) } func testMakeTopEqualLeftOnTargetView() { - meta_testMake(.Top, relation:.Equal, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.top, relation:.equal, relatedAttribute:.left, useTargetView:true) } func testMakeTopEqualRight() { - meta_testMake(.Top, relation:.Equal, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.top, relation:.equal, relatedAttribute:.right, useTargetView:false) } func testMakeTopEqualRightOnTargetView() { - meta_testMake(.Top, relation:.Equal, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.top, relation:.equal, relatedAttribute:.right, useTargetView:true) } func testMakeTopEqualTop() { - meta_testMake(.Top, relation:.Equal, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.top, relation:.equal, relatedAttribute:.top, useTargetView:false) } func testMakeTopEqualTopOnTargetView() { - meta_testMake(.Top, relation:.Equal, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.top, relation:.equal, relatedAttribute:.top, useTargetView:true) } func testMakeTopEqualBottom() { - meta_testMake(.Top, relation:.Equal, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.top, relation:.equal, relatedAttribute:.bottom, useTargetView:false) } func testMakeTopEqualBottomOnTargetView() { - meta_testMake(.Top, relation:.Equal, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.top, relation:.equal, relatedAttribute:.bottom, useTargetView:true) } func testMakeTopEqualLeading() { - meta_testMake(.Top, relation:.Equal, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.top, relation:.equal, relatedAttribute:.leading, useTargetView:false) } func testMakeTopEqualLeadingOnTargetView() { - meta_testMake(.Top, relation:.Equal, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.top, relation:.equal, relatedAttribute:.leading, useTargetView:true) } func testMakeTopEqualTrailing() { - meta_testMake(.Top, relation:.Equal, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.top, relation:.equal, relatedAttribute:.trailing, useTargetView:false) } func testMakeTopEqualTrailingOnTargetView() { - meta_testMake(.Top, relation:.Equal, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.top, relation:.equal, relatedAttribute:.trailing, useTargetView:true) } func testMakeTopEqualCenterX() { - meta_testMake(.Top, relation:.Equal, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.top, relation:.equal, relatedAttribute:.centerX, useTargetView:false) } func testMakeTopEqualCenterXOnTargetView() { - meta_testMake(.Top, relation:.Equal, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.top, relation:.equal, relatedAttribute:.centerX, useTargetView:true) } func testMakeTopEqualCenterY() { - meta_testMake(.Top, relation:.Equal, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.top, relation:.equal, relatedAttribute:.centerY, useTargetView:false) } func testMakeTopEqualCenterYOnTargetView() { - meta_testMake(.Top, relation:.Equal, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.top, relation:.equal, relatedAttribute:.centerY, useTargetView:true) } func testMakeTopEqualBaseline() { - meta_testMake(.Top, relation:.Equal, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.top, relation:.equal, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeTopEqualBaselineOnTargetView() { - meta_testMake(.Top, relation:.Equal, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.top, relation:.equal, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeBottomEqualLeft() { - meta_testMake(.Bottom, relation:.Equal, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.bottom, relation:.equal, relatedAttribute:.left, useTargetView:false) } func testMakeBottomEqualLeftOnTargetView() { - meta_testMake(.Bottom, relation:.Equal, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.bottom, relation:.equal, relatedAttribute:.left, useTargetView:true) } func testMakeBottomEqualRight() { - meta_testMake(.Bottom, relation:.Equal, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.bottom, relation:.equal, relatedAttribute:.right, useTargetView:false) } func testMakeBottomEqualRightOnTargetView() { - meta_testMake(.Bottom, relation:.Equal, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.bottom, relation:.equal, relatedAttribute:.right, useTargetView:true) } func testMakeBottomEqualTop() { - meta_testMake(.Bottom, relation:.Equal, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.bottom, relation:.equal, relatedAttribute:.top, useTargetView:false) } func testMakeBottomEqualTopOnTargetView() { - meta_testMake(.Bottom, relation:.Equal, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.bottom, relation:.equal, relatedAttribute:.top, useTargetView:true) } func testMakeBottomEqualBottom() { - meta_testMake(.Bottom, relation:.Equal, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.bottom, relation:.equal, relatedAttribute:.bottom, useTargetView:false) } func testMakeBottomEqualBottomOnTargetView() { - meta_testMake(.Bottom, relation:.Equal, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.bottom, relation:.equal, relatedAttribute:.bottom, useTargetView:true) } func testMakeBottomEqualLeading() { - meta_testMake(.Bottom, relation:.Equal, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.bottom, relation:.equal, relatedAttribute:.leading, useTargetView:false) } func testMakeBottomEqualLeadingOnTargetView() { - meta_testMake(.Bottom, relation:.Equal, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.bottom, relation:.equal, relatedAttribute:.leading, useTargetView:true) } func testMakeBottomEqualTrailing() { - meta_testMake(.Bottom, relation:.Equal, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.bottom, relation:.equal, relatedAttribute:.trailing, useTargetView:false) } func testMakeBottomEqualTrailingOnTargetView() { - meta_testMake(.Bottom, relation:.Equal, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.bottom, relation:.equal, relatedAttribute:.trailing, useTargetView:true) } func testMakeBottomEqualCenterX() { - meta_testMake(.Bottom, relation:.Equal, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.bottom, relation:.equal, relatedAttribute:.centerX, useTargetView:false) } func testMakeBottomEqualCenterXOnTargetView() { - meta_testMake(.Bottom, relation:.Equal, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.bottom, relation:.equal, relatedAttribute:.centerX, useTargetView:true) } func testMakeBottomEqualCenterY() { - meta_testMake(.Bottom, relation:.Equal, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.bottom, relation:.equal, relatedAttribute:.centerY, useTargetView:false) } func testMakeBottomEqualCenterYOnTargetView() { - meta_testMake(.Bottom, relation:.Equal, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.bottom, relation:.equal, relatedAttribute:.centerY, useTargetView:true) } func testMakeBottomEqualBaseline() { - meta_testMake(.Bottom, relation:.Equal, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.bottom, relation:.equal, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeBottomEqualBaselineOnTargetView() { - meta_testMake(.Bottom, relation:.Equal, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.bottom, relation:.equal, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeLeadingEqualTop() { - meta_testMake(.Leading, relation:.Equal, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.leading, relation:.equal, relatedAttribute:.top, useTargetView:false) } func testMakeLeadingEqualTopOnTargetView() { - meta_testMake(.Leading, relation:.Equal, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.leading, relation:.equal, relatedAttribute:.top, useTargetView:true) } func testMakeLeadingEqualBottom() { - meta_testMake(.Leading, relation:.Equal, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.leading, relation:.equal, relatedAttribute:.bottom, useTargetView:false) } func testMakeLeadingEqualBottomOnTargetView() { - meta_testMake(.Leading, relation:.Equal, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.leading, relation:.equal, relatedAttribute:.bottom, useTargetView:true) } func testMakeLeadingEqualLeading() { - meta_testMake(.Leading, relation:.Equal, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.leading, relation:.equal, relatedAttribute:.leading, useTargetView:false) } func testMakeLeadingEqualLeadingOnTargetView() { - meta_testMake(.Leading, relation:.Equal, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.leading, relation:.equal, relatedAttribute:.leading, useTargetView:true) } func testMakeLeadingEqualTrailing() { - meta_testMake(.Leading, relation:.Equal, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.leading, relation:.equal, relatedAttribute:.trailing, useTargetView:false) } func testMakeLeadingEqualTrailingOnTargetView() { - meta_testMake(.Leading, relation:.Equal, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.leading, relation:.equal, relatedAttribute:.trailing, useTargetView:true) } func testMakeLeadingEqualCenterX() { - meta_testMake(.Leading, relation:.Equal, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.leading, relation:.equal, relatedAttribute:.centerX, useTargetView:false) } func testMakeLeadingEqualCenterXOnTargetView() { - meta_testMake(.Leading, relation:.Equal, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.leading, relation:.equal, relatedAttribute:.centerX, useTargetView:true) } func testMakeLeadingEqualCenterY() { - meta_testMake(.Leading, relation:.Equal, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.leading, relation:.equal, relatedAttribute:.centerY, useTargetView:false) } func testMakeLeadingEqualCenterYOnTargetView() { - meta_testMake(.Leading, relation:.Equal, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.leading, relation:.equal, relatedAttribute:.centerY, useTargetView:true) } func testMakeLeadingEqualBaseline() { - meta_testMake(.Leading, relation:.Equal, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.leading, relation:.equal, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeLeadingEqualBaselineOnTargetView() { - meta_testMake(.Leading, relation:.Equal, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.leading, relation:.equal, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeTrailingEqualTop() { - meta_testMake(.Trailing, relation:.Equal, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.trailing, relation:.equal, relatedAttribute:.top, useTargetView:false) } func testMakeTrailingEqualTopOnTargetView() { - meta_testMake(.Trailing, relation:.Equal, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.trailing, relation:.equal, relatedAttribute:.top, useTargetView:true) } func testMakeTrailingEqualBottom() { - meta_testMake(.Trailing, relation:.Equal, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.trailing, relation:.equal, relatedAttribute:.bottom, useTargetView:false) } func testMakeTrailingEqualBottomOnTargetView() { - meta_testMake(.Trailing, relation:.Equal, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.trailing, relation:.equal, relatedAttribute:.bottom, useTargetView:true) } func testMakeTrailingEqualLeading() { - meta_testMake(.Trailing, relation:.Equal, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.trailing, relation:.equal, relatedAttribute:.leading, useTargetView:false) } func testMakeTrailingEqualLeadingOnTargetView() { - meta_testMake(.Trailing, relation:.Equal, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.trailing, relation:.equal, relatedAttribute:.leading, useTargetView:true) } func testMakeTrailingEqualTrailing() { - meta_testMake(.Trailing, relation:.Equal, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.trailing, relation:.equal, relatedAttribute:.trailing, useTargetView:false) } func testMakeTrailingEqualTrailingOnTargetView() { - meta_testMake(.Trailing, relation:.Equal, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.trailing, relation:.equal, relatedAttribute:.trailing, useTargetView:true) } func testMakeTrailingEqualCenterX() { - meta_testMake(.Trailing, relation:.Equal, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.trailing, relation:.equal, relatedAttribute:.centerX, useTargetView:false) } func testMakeTrailingEqualCenterXOnTargetView() { - meta_testMake(.Trailing, relation:.Equal, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.trailing, relation:.equal, relatedAttribute:.centerX, useTargetView:true) } func testMakeTrailingEqualCenterY() { - meta_testMake(.Trailing, relation:.Equal, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.trailing, relation:.equal, relatedAttribute:.centerY, useTargetView:false) } func testMakeTrailingEqualCenterYOnTargetView() { - meta_testMake(.Trailing, relation:.Equal, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.trailing, relation:.equal, relatedAttribute:.centerY, useTargetView:true) } func testMakeTrailingEqualBaseline() { - meta_testMake(.Trailing, relation:.Equal, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.trailing, relation:.equal, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeTrailingEqualBaselineOnTargetView() { - meta_testMake(.Trailing, relation:.Equal, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.trailing, relation:.equal, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeHeightEqualWidth() { - meta_testMake(.Height, relation:.Equal, relatedAttribute:.Width, useTargetView:false) + meta_testMake(.height, relation:.equal, relatedAttribute:.width, useTargetView:false) } func testMakeHeightEqualWidthOnTargetView() { - meta_testMake(.Height, relation:.Equal, relatedAttribute:.Width, useTargetView:true) + meta_testMake(.height, relation:.equal, relatedAttribute:.width, useTargetView:true) } func testMakeHeightEqualHeight() { - meta_testMake(.Height, relation:.Equal, relatedAttribute:.Height, useTargetView:false) + meta_testMake(.height, relation:.equal, relatedAttribute:.height, useTargetView:false) } func testMakeHeightEqualHeightOnTargetView() { - meta_testMake(.Height, relation:.Equal, relatedAttribute:.Height, useTargetView:true) + meta_testMake(.height, relation:.equal, relatedAttribute:.height, useTargetView:true) } func testMakeCenterXEqualLeft() { - meta_testMake(.CenterX, relation:.Equal, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.centerX, relation:.equal, relatedAttribute:.left, useTargetView:false) } func testMakeCenterXEqualLeftOnTargetView() { - meta_testMake(.CenterX, relation:.Equal, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.centerX, relation:.equal, relatedAttribute:.left, useTargetView:true) } func testMakeCenterXEqualRight() { - meta_testMake(.CenterX, relation:.Equal, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.centerX, relation:.equal, relatedAttribute:.right, useTargetView:false) } func testMakeCenterXEqualRightOnTargetView() { - meta_testMake(.CenterX, relation:.Equal, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.centerX, relation:.equal, relatedAttribute:.right, useTargetView:true) } func testMakeCenterXEqualTop() { - meta_testMake(.CenterX, relation:.Equal, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.centerX, relation:.equal, relatedAttribute:.top, useTargetView:false) } func testMakeCenterXEqualTopOnTargetView() { - meta_testMake(.CenterX, relation:.Equal, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.centerX, relation:.equal, relatedAttribute:.top, useTargetView:true) } func testMakeCenterXEqualBottom() { - meta_testMake(.CenterX, relation:.Equal, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.centerX, relation:.equal, relatedAttribute:.bottom, useTargetView:false) } func testMakeCenterXEqualBottomOnTargetView() { - meta_testMake(.CenterX, relation:.Equal, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.centerX, relation:.equal, relatedAttribute:.bottom, useTargetView:true) } func testMakeCenterXEqualLeading() { - meta_testMake(.CenterX, relation:.Equal, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.centerX, relation:.equal, relatedAttribute:.leading, useTargetView:false) } func testMakeCenterXEqualLeadingOnTargetView() { - meta_testMake(.CenterX, relation:.Equal, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.centerX, relation:.equal, relatedAttribute:.leading, useTargetView:true) } func testMakeCenterXEqualTrailing() { - meta_testMake(.CenterX, relation:.Equal, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.centerX, relation:.equal, relatedAttribute:.trailing, useTargetView:false) } func testMakeCenterXEqualTrailingOnTargetView() { - meta_testMake(.CenterX, relation:.Equal, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.centerX, relation:.equal, relatedAttribute:.trailing, useTargetView:true) } func testMakeCenterXEqualCenterX() { - meta_testMake(.CenterX, relation:.Equal, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.centerX, relation:.equal, relatedAttribute:.centerX, useTargetView:false) } func testMakeCenterXEqualCenterXOnTargetView() { - meta_testMake(.CenterX, relation:.Equal, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.centerX, relation:.equal, relatedAttribute:.centerX, useTargetView:true) } func testMakeCenterXEqualCenterY() { - meta_testMake(.CenterX, relation:.Equal, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.centerX, relation:.equal, relatedAttribute:.centerY, useTargetView:false) } func testMakeCenterXEqualCenterYOnTargetView() { - meta_testMake(.CenterX, relation:.Equal, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.centerX, relation:.equal, relatedAttribute:.centerY, useTargetView:true) } func testMakeCenterXEqualBaseline() { - meta_testMake(.CenterX, relation:.Equal, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.centerX, relation:.equal, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeCenterXEqualBaselineOnTargetView() { - meta_testMake(.CenterX, relation:.Equal, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.centerX, relation:.equal, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeCenterYEqualLeft() { - meta_testMake(.CenterY, relation:.Equal, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.centerY, relation:.equal, relatedAttribute:.left, useTargetView:false) } func testMakeCenterYEqualLeftOnTargetView() { - meta_testMake(.CenterY, relation:.Equal, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.centerY, relation:.equal, relatedAttribute:.left, useTargetView:true) } func testMakeCenterYEqualRight() { - meta_testMake(.CenterY, relation:.Equal, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.centerY, relation:.equal, relatedAttribute:.right, useTargetView:false) } func testMakeCenterYEqualRightOnTargetView() { - meta_testMake(.CenterY, relation:.Equal, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.centerY, relation:.equal, relatedAttribute:.right, useTargetView:true) } func testMakeCenterYEqualTop() { - meta_testMake(.CenterY, relation:.Equal, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.centerY, relation:.equal, relatedAttribute:.top, useTargetView:false) } func testMakeCenterYEqualTopOnTargetView() { - meta_testMake(.CenterY, relation:.Equal, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.centerY, relation:.equal, relatedAttribute:.top, useTargetView:true) } func testMakeCenterYEqualBottom() { - meta_testMake(.CenterY, relation:.Equal, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.centerY, relation:.equal, relatedAttribute:.bottom, useTargetView:false) } func testMakeCenterYEqualBottomOnTargetView() { - meta_testMake(.CenterY, relation:.Equal, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.centerY, relation:.equal, relatedAttribute:.bottom, useTargetView:true) } func testMakeCenterYEqualLeading() { - meta_testMake(.CenterY, relation:.Equal, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.centerY, relation:.equal, relatedAttribute:.leading, useTargetView:false) } func testMakeCenterYEqualLeadingOnTargetView() { - meta_testMake(.CenterY, relation:.Equal, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.centerY, relation:.equal, relatedAttribute:.leading, useTargetView:true) } func testMakeCenterYEqualTrailing() { - meta_testMake(.CenterY, relation:.Equal, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.centerY, relation:.equal, relatedAttribute:.trailing, useTargetView:false) } func testMakeCenterYEqualTrailingOnTargetView() { - meta_testMake(.CenterY, relation:.Equal, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.centerY, relation:.equal, relatedAttribute:.trailing, useTargetView:true) } func testMakeCenterYEqualCenterX() { - meta_testMake(.CenterY, relation:.Equal, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.centerY, relation:.equal, relatedAttribute:.centerX, useTargetView:false) } func testMakeCenterYEqualCenterXOnTargetView() { - meta_testMake(.CenterY, relation:.Equal, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.centerY, relation:.equal, relatedAttribute:.centerX, useTargetView:true) } func testMakeCenterYEqualCenterY() { - meta_testMake(.CenterY, relation:.Equal, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.centerY, relation:.equal, relatedAttribute:.centerY, useTargetView:false) } func testMakeCenterYEqualCenterYOnTargetView() { - meta_testMake(.CenterY, relation:.Equal, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.centerY, relation:.equal, relatedAttribute:.centerY, useTargetView:true) } func testMakeCenterYEqualBaseline() { - meta_testMake(.CenterY, relation:.Equal, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.centerY, relation:.equal, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeCenterYEqualBaselineOnTargetView() { - meta_testMake(.CenterY, relation:.Equal, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.centerY, relation:.equal, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeBaselineEqualLeft() { - meta_testMake(.LastBaseline, relation:.Equal, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.lastBaseline, relation:.equal, relatedAttribute:.left, useTargetView:false) } func testMakeBaselineEqualLeftOnTargetView() { - meta_testMake(.LastBaseline, relation:.Equal, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.lastBaseline, relation:.equal, relatedAttribute:.left, useTargetView:true) } func testMakeBaselineEqualRight() { - meta_testMake(.LastBaseline, relation:.Equal, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.lastBaseline, relation:.equal, relatedAttribute:.right, useTargetView:false) } func testMakeBaselineEqualRightOnTargetView() { - meta_testMake(.LastBaseline, relation:.Equal, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.lastBaseline, relation:.equal, relatedAttribute:.right, useTargetView:true) } func testMakeBaselineEqualTop() { - meta_testMake(.LastBaseline, relation:.Equal, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.lastBaseline, relation:.equal, relatedAttribute:.top, useTargetView:false) } func testMakeBaselineEqualTopOnTargetView() { - meta_testMake(.LastBaseline, relation:.Equal, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.lastBaseline, relation:.equal, relatedAttribute:.top, useTargetView:true) } func testMakeBaselineEqualBottom() { - meta_testMake(.LastBaseline, relation:.Equal, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.lastBaseline, relation:.equal, relatedAttribute:.bottom, useTargetView:false) } func testMakeBaselineEqualBottomOnTargetView() { - meta_testMake(.LastBaseline, relation:.Equal, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.lastBaseline, relation:.equal, relatedAttribute:.bottom, useTargetView:true) } func testMakeBaselineEqualLeading() { - meta_testMake(.LastBaseline, relation:.Equal, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.lastBaseline, relation:.equal, relatedAttribute:.leading, useTargetView:false) } func testMakeBaselineEqualLeadingOnTargetView() { - meta_testMake(.LastBaseline, relation:.Equal, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.lastBaseline, relation:.equal, relatedAttribute:.leading, useTargetView:true) } func testMakeBaselineEqualTrailing() { - meta_testMake(.LastBaseline, relation:.Equal, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.lastBaseline, relation:.equal, relatedAttribute:.trailing, useTargetView:false) } func testMakeBaselineEqualTrailingOnTargetView() { - meta_testMake(.LastBaseline, relation:.Equal, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.lastBaseline, relation:.equal, relatedAttribute:.trailing, useTargetView:true) } func testMakeBaselineEqualCenterX() { - meta_testMake(.LastBaseline, relation:.Equal, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.lastBaseline, relation:.equal, relatedAttribute:.centerX, useTargetView:false) } func testMakeBaselineEqualCenterXOnTargetView() { - meta_testMake(.LastBaseline, relation:.Equal, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.lastBaseline, relation:.equal, relatedAttribute:.centerX, useTargetView:true) } func testMakeBaselineEqualCenterY() { - meta_testMake(.LastBaseline, relation:.Equal, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.lastBaseline, relation:.equal, relatedAttribute:.centerY, useTargetView:false) } func testMakeBaselineEqualCenterYOnTargetView() { - meta_testMake(.LastBaseline, relation:.Equal, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.lastBaseline, relation:.equal, relatedAttribute:.centerY, useTargetView:true) } func testMakeBaselineEqualBaseline() { - meta_testMake(.LastBaseline, relation:.Equal, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.lastBaseline, relation:.equal, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeBaselineEqualBaselineOnTargetView() { - meta_testMake(.LastBaseline, relation:.Equal, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.lastBaseline, relation:.equal, relatedAttribute:.lastBaseline, useTargetView:true) } // MARK: - TESTS: MAKE/GREATERTHAN func testMakeLeftGreaterThanLeft() { - meta_testMake(.Left, relation:.GreaterThanOrEqual, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.left, relation:.greaterThanOrEqual, relatedAttribute:.left, useTargetView:false) } func testMakeLeftGreaterThanLeftOnTargetView() { - meta_testMake(.Left, relation:.GreaterThanOrEqual, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.left, relation:.greaterThanOrEqual, relatedAttribute:.left, useTargetView:true) } func testMakeLeftGreaterThanRight() { - meta_testMake(.Left, relation:.GreaterThanOrEqual, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.left, relation:.greaterThanOrEqual, relatedAttribute:.right, useTargetView:false) } func testMakeLeftGreaterThanRightOnTargetView() { - meta_testMake(.Left, relation:.GreaterThanOrEqual, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.left, relation:.greaterThanOrEqual, relatedAttribute:.right, useTargetView:true) } func testMakeLeftGreaterThanTop() { - meta_testMake(.Left, relation:.GreaterThanOrEqual, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.left, relation:.greaterThanOrEqual, relatedAttribute:.top, useTargetView:false) } func testMakeLeftGreaterThanTopOnTargetView() { - meta_testMake(.Left, relation:.GreaterThanOrEqual, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.left, relation:.greaterThanOrEqual, relatedAttribute:.top, useTargetView:true) } func testMakeLeftGreaterThanBottom() { - meta_testMake(.Left, relation:.GreaterThanOrEqual, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.left, relation:.greaterThanOrEqual, relatedAttribute:.bottom, useTargetView:false) } func testMakeLeftGreaterThanBottomOnTargetView() { - meta_testMake(.Left, relation:.GreaterThanOrEqual, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.left, relation:.greaterThanOrEqual, relatedAttribute:.bottom, useTargetView:true) } func testMakeLeftGreaterThanCenterX() { - meta_testMake(.Left, relation:.GreaterThanOrEqual, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.left, relation:.greaterThanOrEqual, relatedAttribute:.centerX, useTargetView:false) } func testMakeLeftGreaterThanCenterXOnTargetView() { - meta_testMake(.Left, relation:.GreaterThanOrEqual, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.left, relation:.greaterThanOrEqual, relatedAttribute:.centerX, useTargetView:true) } func testMakeLeftGreaterThanCenterY() { - meta_testMake(.Left, relation:.GreaterThanOrEqual, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.left, relation:.greaterThanOrEqual, relatedAttribute:.centerY, useTargetView:false) } func testMakeLeftGreaterThanCenterYOnTargetView() { - meta_testMake(.Left, relation:.GreaterThanOrEqual, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.left, relation:.greaterThanOrEqual, relatedAttribute:.centerY, useTargetView:true) } func testMakeLeftGreaterThanBaseline() { - meta_testMake(.Left, relation:.GreaterThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.left, relation:.greaterThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeLeftGreaterThanBaselineOnTargetView() { - meta_testMake(.Left, relation:.GreaterThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.left, relation:.greaterThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeRightGreaterThanLeft() { - meta_testMake(.Right, relation:.GreaterThanOrEqual, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.right, relation:.greaterThanOrEqual, relatedAttribute:.left, useTargetView:false) } func testMakeRightGreaterThanLeftOnTargetView() { - meta_testMake(.Right, relation:.GreaterThanOrEqual, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.right, relation:.greaterThanOrEqual, relatedAttribute:.left, useTargetView:true) } func testMakeRightGreaterThanRight() { - meta_testMake(.Right, relation:.GreaterThanOrEqual, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.right, relation:.greaterThanOrEqual, relatedAttribute:.right, useTargetView:false) } func testMakeRightGreaterThanRightOnTargetView() { - meta_testMake(.Right, relation:.GreaterThanOrEqual, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.right, relation:.greaterThanOrEqual, relatedAttribute:.right, useTargetView:true) } func testMakeRightGreaterThanTop() { - meta_testMake(.Right, relation:.GreaterThanOrEqual, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.right, relation:.greaterThanOrEqual, relatedAttribute:.top, useTargetView:false) } func testMakeRightGreaterThanTopOnTargetView() { - meta_testMake(.Right, relation:.GreaterThanOrEqual, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.right, relation:.greaterThanOrEqual, relatedAttribute:.top, useTargetView:true) } func testMakeRightGreaterThanBottom() { - meta_testMake(.Right, relation:.GreaterThanOrEqual, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.right, relation:.greaterThanOrEqual, relatedAttribute:.bottom, useTargetView:false) } func testMakeRightGreaterThanBottomOnTargetView() { - meta_testMake(.Right, relation:.GreaterThanOrEqual, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.right, relation:.greaterThanOrEqual, relatedAttribute:.bottom, useTargetView:true) } func testMakeRightGreaterThanCenterX() { - meta_testMake(.Right, relation:.GreaterThanOrEqual, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.right, relation:.greaterThanOrEqual, relatedAttribute:.centerX, useTargetView:false) } func testMakeRightGreaterThanCenterXOnTargetView() { - meta_testMake(.Right, relation:.GreaterThanOrEqual, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.right, relation:.greaterThanOrEqual, relatedAttribute:.centerX, useTargetView:true) } func testMakeRightGreaterThanCenterY() { - meta_testMake(.Right, relation:.GreaterThanOrEqual, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.right, relation:.greaterThanOrEqual, relatedAttribute:.centerY, useTargetView:false) } func testMakeRightGreaterThanCenterYOnTargetView() { - meta_testMake(.Right, relation:.GreaterThanOrEqual, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.right, relation:.greaterThanOrEqual, relatedAttribute:.centerY, useTargetView:true) } func testMakeRightGreaterThanBaseline() { - meta_testMake(.Right, relation:.GreaterThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.right, relation:.greaterThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeRightGreaterThanBaselineOnTargetView() { - meta_testMake(.Right, relation:.GreaterThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.right, relation:.greaterThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeTopGreaterThanLeft() { - meta_testMake(.Top, relation:.GreaterThanOrEqual, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.top, relation:.greaterThanOrEqual, relatedAttribute:.left, useTargetView:false) } func testMakeTopGreaterThanLeftOnTargetView() { - meta_testMake(.Top, relation:.GreaterThanOrEqual, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.top, relation:.greaterThanOrEqual, relatedAttribute:.left, useTargetView:true) } func testMakeTopGreaterThanRight() { - meta_testMake(.Top, relation:.GreaterThanOrEqual, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.top, relation:.greaterThanOrEqual, relatedAttribute:.right, useTargetView:false) } func testMakeTopGreaterThanRightOnTargetView() { - meta_testMake(.Top, relation:.GreaterThanOrEqual, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.top, relation:.greaterThanOrEqual, relatedAttribute:.right, useTargetView:true) } func testMakeTopGreaterThanTop() { - meta_testMake(.Top, relation:.GreaterThanOrEqual, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.top, relation:.greaterThanOrEqual, relatedAttribute:.top, useTargetView:false) } func testMakeTopGreaterThanTopOnTargetView() { - meta_testMake(.Top, relation:.GreaterThanOrEqual, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.top, relation:.greaterThanOrEqual, relatedAttribute:.top, useTargetView:true) } func testMakeTopGreaterThanBottom() { - meta_testMake(.Top, relation:.GreaterThanOrEqual, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.top, relation:.greaterThanOrEqual, relatedAttribute:.bottom, useTargetView:false) } func testMakeTopGreaterThanBottomOnTargetView() { - meta_testMake(.Top, relation:.GreaterThanOrEqual, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.top, relation:.greaterThanOrEqual, relatedAttribute:.bottom, useTargetView:true) } func testMakeTopGreaterThanLeading() { - meta_testMake(.Top, relation:.GreaterThanOrEqual, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.top, relation:.greaterThanOrEqual, relatedAttribute:.leading, useTargetView:false) } func testMakeTopGreaterThanLeadingOnTargetView() { - meta_testMake(.Top, relation:.GreaterThanOrEqual, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.top, relation:.greaterThanOrEqual, relatedAttribute:.leading, useTargetView:true) } func testMakeTopGreaterThanTrailing() { - meta_testMake(.Top, relation:.GreaterThanOrEqual, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.top, relation:.greaterThanOrEqual, relatedAttribute:.trailing, useTargetView:false) } func testMakeTopGreaterThanTrailingOnTargetView() { - meta_testMake(.Top, relation:.GreaterThanOrEqual, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.top, relation:.greaterThanOrEqual, relatedAttribute:.trailing, useTargetView:true) } func testMakeTopGreaterThanCenterX() { - meta_testMake(.Top, relation:.GreaterThanOrEqual, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.top, relation:.greaterThanOrEqual, relatedAttribute:.centerX, useTargetView:false) } func testMakeTopGreaterThanCenterXOnTargetView() { - meta_testMake(.Top, relation:.GreaterThanOrEqual, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.top, relation:.greaterThanOrEqual, relatedAttribute:.centerX, useTargetView:true) } func testMakeTopGreaterThanCenterY() { - meta_testMake(.Top, relation:.GreaterThanOrEqual, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.top, relation:.greaterThanOrEqual, relatedAttribute:.centerY, useTargetView:false) } func testMakeTopGreaterThanCenterYOnTargetView() { - meta_testMake(.Top, relation:.GreaterThanOrEqual, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.top, relation:.greaterThanOrEqual, relatedAttribute:.centerY, useTargetView:true) } func testMakeTopGreaterThanBaseline() { - meta_testMake(.Top, relation:.GreaterThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.top, relation:.greaterThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeTopGreaterThanBaselineOnTargetView() { - meta_testMake(.Top, relation:.GreaterThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.top, relation:.greaterThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeBottomGreaterThanLeft() { - meta_testMake(.Bottom, relation:.GreaterThanOrEqual, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.bottom, relation:.greaterThanOrEqual, relatedAttribute:.left, useTargetView:false) } func testMakeBottomGreaterThanLeftOnTargetView() { - meta_testMake(.Bottom, relation:.GreaterThanOrEqual, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.bottom, relation:.greaterThanOrEqual, relatedAttribute:.left, useTargetView:true) } func testMakeBottomGreaterThanRight() { - meta_testMake(.Bottom, relation:.GreaterThanOrEqual, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.bottom, relation:.greaterThanOrEqual, relatedAttribute:.right, useTargetView:false) } func testMakeBottomGreaterThanRightOnTargetView() { - meta_testMake(.Bottom, relation:.GreaterThanOrEqual, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.bottom, relation:.greaterThanOrEqual, relatedAttribute:.right, useTargetView:true) } func testMakeBottomGreaterThanTop() { - meta_testMake(.Bottom, relation:.GreaterThanOrEqual, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.bottom, relation:.greaterThanOrEqual, relatedAttribute:.top, useTargetView:false) } func testMakeBottomGreaterThanTopOnTargetView() { - meta_testMake(.Bottom, relation:.GreaterThanOrEqual, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.bottom, relation:.greaterThanOrEqual, relatedAttribute:.top, useTargetView:true) } func testMakeBottomGreaterThanBottom() { - meta_testMake(.Bottom, relation:.GreaterThanOrEqual, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.bottom, relation:.greaterThanOrEqual, relatedAttribute:.bottom, useTargetView:false) } func testMakeBottomGreaterThanBottomOnTargetView() { - meta_testMake(.Bottom, relation:.GreaterThanOrEqual, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.bottom, relation:.greaterThanOrEqual, relatedAttribute:.bottom, useTargetView:true) } func testMakeBottomGreaterThanLeading() { - meta_testMake(.Bottom, relation:.GreaterThanOrEqual, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.bottom, relation:.greaterThanOrEqual, relatedAttribute:.leading, useTargetView:false) } func testMakeBottomGreaterThanLeadingOnTargetView() { - meta_testMake(.Bottom, relation:.GreaterThanOrEqual, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.bottom, relation:.greaterThanOrEqual, relatedAttribute:.leading, useTargetView:true) } func testMakeBottomGreaterThanTrailing() { - meta_testMake(.Bottom, relation:.GreaterThanOrEqual, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.bottom, relation:.greaterThanOrEqual, relatedAttribute:.trailing, useTargetView:false) } func testMakeBottomGreaterThanTrailingOnTargetView() { - meta_testMake(.Bottom, relation:.GreaterThanOrEqual, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.bottom, relation:.greaterThanOrEqual, relatedAttribute:.trailing, useTargetView:true) } func testMakeBottomGreaterThanCenterX() { - meta_testMake(.Bottom, relation:.GreaterThanOrEqual, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.bottom, relation:.greaterThanOrEqual, relatedAttribute:.centerX, useTargetView:false) } func testMakeBottomGreaterThanCenterXOnTargetView() { - meta_testMake(.Bottom, relation:.GreaterThanOrEqual, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.bottom, relation:.greaterThanOrEqual, relatedAttribute:.centerX, useTargetView:true) } func testMakeBottomGreaterThanCenterY() { - meta_testMake(.Bottom, relation:.GreaterThanOrEqual, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.bottom, relation:.greaterThanOrEqual, relatedAttribute:.centerY, useTargetView:false) } func testMakeBottomGreaterThanCenterYOnTargetView() { - meta_testMake(.Bottom, relation:.GreaterThanOrEqual, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.bottom, relation:.greaterThanOrEqual, relatedAttribute:.centerY, useTargetView:true) } func testMakeBottomGreaterThanBaseline() { - meta_testMake(.Bottom, relation:.GreaterThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.bottom, relation:.greaterThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeBottomGreaterThanBaselineOnTargetView() { - meta_testMake(.Bottom, relation:.GreaterThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.bottom, relation:.greaterThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeLeadingGreaterThanTop() { - meta_testMake(.Leading, relation:.GreaterThanOrEqual, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.leading, relation:.greaterThanOrEqual, relatedAttribute:.top, useTargetView:false) } func testMakeLeadingGreaterThanTopOnTargetView() { - meta_testMake(.Leading, relation:.GreaterThanOrEqual, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.leading, relation:.greaterThanOrEqual, relatedAttribute:.top, useTargetView:true) } func testMakeLeadingGreaterThanBottom() { - meta_testMake(.Leading, relation:.GreaterThanOrEqual, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.leading, relation:.greaterThanOrEqual, relatedAttribute:.bottom, useTargetView:false) } func testMakeLeadingGreaterThanBottomOnTargetView() { - meta_testMake(.Leading, relation:.GreaterThanOrEqual, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.leading, relation:.greaterThanOrEqual, relatedAttribute:.bottom, useTargetView:true) } func testMakeLeadingGreaterThanLeading() { - meta_testMake(.Leading, relation:.GreaterThanOrEqual, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.leading, relation:.greaterThanOrEqual, relatedAttribute:.leading, useTargetView:false) } func testMakeLeadingGreaterThanLeadingOnTargetView() { - meta_testMake(.Leading, relation:.GreaterThanOrEqual, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.leading, relation:.greaterThanOrEqual, relatedAttribute:.leading, useTargetView:true) } func testMakeLeadingGreaterThanTrailing() { - meta_testMake(.Leading, relation:.GreaterThanOrEqual, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.leading, relation:.greaterThanOrEqual, relatedAttribute:.trailing, useTargetView:false) } func testMakeLeadingGreaterThanTrailingOnTargetView() { - meta_testMake(.Leading, relation:.GreaterThanOrEqual, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.leading, relation:.greaterThanOrEqual, relatedAttribute:.trailing, useTargetView:true) } func testMakeLeadingGreaterThanCenterX() { - meta_testMake(.Leading, relation:.GreaterThanOrEqual, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.leading, relation:.greaterThanOrEqual, relatedAttribute:.centerX, useTargetView:false) } func testMakeLeadingGreaterThanCenterXOnTargetView() { - meta_testMake(.Leading, relation:.GreaterThanOrEqual, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.leading, relation:.greaterThanOrEqual, relatedAttribute:.centerX, useTargetView:true) } func testMakeLeadingGreaterThanCenterY() { - meta_testMake(.Leading, relation:.GreaterThanOrEqual, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.leading, relation:.greaterThanOrEqual, relatedAttribute:.centerY, useTargetView:false) } func testMakeLeadingGreaterThanCenterYOnTargetView() { - meta_testMake(.Leading, relation:.GreaterThanOrEqual, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.leading, relation:.greaterThanOrEqual, relatedAttribute:.centerY, useTargetView:true) } func testMakeLeadingGreaterThanBaseline() { - meta_testMake(.Leading, relation:.GreaterThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.leading, relation:.greaterThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeLeadingGreaterThanBaselineOnTargetView() { - meta_testMake(.Leading, relation:.GreaterThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.leading, relation:.greaterThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeTrailingGreaterThanTop() { - meta_testMake(.Trailing, relation:.GreaterThanOrEqual, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.trailing, relation:.greaterThanOrEqual, relatedAttribute:.top, useTargetView:false) } func testMakeTrailingGreaterThanTopOnTargetView() { - meta_testMake(.Trailing, relation:.GreaterThanOrEqual, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.trailing, relation:.greaterThanOrEqual, relatedAttribute:.top, useTargetView:true) } func testMakeTrailingGreaterThanBottom() { - meta_testMake(.Trailing, relation:.GreaterThanOrEqual, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.trailing, relation:.greaterThanOrEqual, relatedAttribute:.bottom, useTargetView:false) } func testMakeTrailingGreaterThanBottomOnTargetView() { - meta_testMake(.Trailing, relation:.GreaterThanOrEqual, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.trailing, relation:.greaterThanOrEqual, relatedAttribute:.bottom, useTargetView:true) } func testMakeTrailingGreaterThanLeading() { - meta_testMake(.Trailing, relation:.GreaterThanOrEqual, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.trailing, relation:.greaterThanOrEqual, relatedAttribute:.leading, useTargetView:false) } func testMakeTrailingGreaterThanLeadingOnTargetView() { - meta_testMake(.Trailing, relation:.GreaterThanOrEqual, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.trailing, relation:.greaterThanOrEqual, relatedAttribute:.leading, useTargetView:true) } func testMakeTrailingGreaterThanTrailing() { - meta_testMake(.Trailing, relation:.GreaterThanOrEqual, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.trailing, relation:.greaterThanOrEqual, relatedAttribute:.trailing, useTargetView:false) } func testMakeTrailingGreaterThanTrailingOnTargetView() { - meta_testMake(.Trailing, relation:.GreaterThanOrEqual, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.trailing, relation:.greaterThanOrEqual, relatedAttribute:.trailing, useTargetView:true) } func testMakeTrailingGreaterThanCenterX() { - meta_testMake(.Trailing, relation:.GreaterThanOrEqual, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.trailing, relation:.greaterThanOrEqual, relatedAttribute:.centerX, useTargetView:false) } func testMakeTrailingGreaterThanCenterXOnTargetView() { - meta_testMake(.Trailing, relation:.GreaterThanOrEqual, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.trailing, relation:.greaterThanOrEqual, relatedAttribute:.centerX, useTargetView:true) } func testMakeTrailingGreaterThanCenterY() { - meta_testMake(.Trailing, relation:.GreaterThanOrEqual, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.trailing, relation:.greaterThanOrEqual, relatedAttribute:.centerY, useTargetView:false) } func testMakeTrailingGreaterThanCenterYOnTargetView() { - meta_testMake(.Trailing, relation:.GreaterThanOrEqual, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.trailing, relation:.greaterThanOrEqual, relatedAttribute:.centerY, useTargetView:true) } func testMakeTrailingGreaterThanBaseline() { - meta_testMake(.Trailing, relation:.GreaterThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.trailing, relation:.greaterThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeTrailingGreaterThanBaselineOnTargetView() { - meta_testMake(.Trailing, relation:.GreaterThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.trailing, relation:.greaterThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeWidthGreaterThanWidth() { - meta_testMake(.Width, relation:.GreaterThanOrEqual, relatedAttribute:.Width, useTargetView:false) + meta_testMake(.width, relation:.greaterThanOrEqual, relatedAttribute:.width, useTargetView:false) } func testMakeWidthGreaterThanWidthOnTargetView() { - meta_testMake(.Width, relation:.GreaterThanOrEqual, relatedAttribute:.Width, useTargetView:true) + meta_testMake(.width, relation:.greaterThanOrEqual, relatedAttribute:.width, useTargetView:true) } func testMakeWidthGreaterThanHeight() { - meta_testMake(.Width, relation:.GreaterThanOrEqual, relatedAttribute:.Height, useTargetView:false) + meta_testMake(.width, relation:.greaterThanOrEqual, relatedAttribute:.height, useTargetView:false) } func testMakeWidthGreaterThanHeightOnTargetView() { - meta_testMake(.Width, relation:.GreaterThanOrEqual, relatedAttribute:.Height, useTargetView:true) + meta_testMake(.width, relation:.greaterThanOrEqual, relatedAttribute:.height, useTargetView:true) } func testMakeHeightGreaterThanWidth() { - meta_testMake(.Height, relation:.GreaterThanOrEqual, relatedAttribute:.Width, useTargetView:false) + meta_testMake(.height, relation:.greaterThanOrEqual, relatedAttribute:.width, useTargetView:false) } func testMakeHeightGreaterThanWidthOnTargetView() { - meta_testMake(.Height, relation:.GreaterThanOrEqual, relatedAttribute:.Width, useTargetView:true) + meta_testMake(.height, relation:.greaterThanOrEqual, relatedAttribute:.width, useTargetView:true) } func testMakeHeightGreaterThanHeight() { - meta_testMake(.Height, relation:.GreaterThanOrEqual, relatedAttribute:.Height, useTargetView:false) + meta_testMake(.height, relation:.greaterThanOrEqual, relatedAttribute:.height, useTargetView:false) } func testMakeHeightGreaterThanHeightOnTargetView() { - meta_testMake(.Height, relation:.GreaterThanOrEqual, relatedAttribute:.Height, useTargetView:true) + meta_testMake(.height, relation:.greaterThanOrEqual, relatedAttribute:.height, useTargetView:true) } func testMakeCenterXGreaterThanLeft() { - meta_testMake(.CenterX, relation:.GreaterThanOrEqual, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.centerX, relation:.greaterThanOrEqual, relatedAttribute:.left, useTargetView:false) } func testMakeCenterXGreaterThanLeftOnTargetView() { - meta_testMake(.CenterX, relation:.GreaterThanOrEqual, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.centerX, relation:.greaterThanOrEqual, relatedAttribute:.left, useTargetView:true) } func testMakeCenterXGreaterThanRight() { - meta_testMake(.CenterX, relation:.GreaterThanOrEqual, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.centerX, relation:.greaterThanOrEqual, relatedAttribute:.right, useTargetView:false) } func testMakeCenterXGreaterThanRightOnTargetView() { - meta_testMake(.CenterX, relation:.GreaterThanOrEqual, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.centerX, relation:.greaterThanOrEqual, relatedAttribute:.right, useTargetView:true) } func testMakeCenterXGreaterThanTop() { - meta_testMake(.CenterX, relation:.GreaterThanOrEqual, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.centerX, relation:.greaterThanOrEqual, relatedAttribute:.top, useTargetView:false) } func testMakeCenterXGreaterThanTopOnTargetView() { - meta_testMake(.CenterX, relation:.GreaterThanOrEqual, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.centerX, relation:.greaterThanOrEqual, relatedAttribute:.top, useTargetView:true) } func testMakeCenterXGreaterThanBottom() { - meta_testMake(.CenterX, relation:.GreaterThanOrEqual, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.centerX, relation:.greaterThanOrEqual, relatedAttribute:.bottom, useTargetView:false) } func testMakeCenterXGreaterThanBottomOnTargetView() { - meta_testMake(.CenterX, relation:.GreaterThanOrEqual, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.centerX, relation:.greaterThanOrEqual, relatedAttribute:.bottom, useTargetView:true) } func testMakeCenterXGreaterThanLeading() { - meta_testMake(.CenterX, relation:.GreaterThanOrEqual, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.centerX, relation:.greaterThanOrEqual, relatedAttribute:.leading, useTargetView:false) } func testMakeCenterXGreaterThanLeadingOnTargetView() { - meta_testMake(.CenterX, relation:.GreaterThanOrEqual, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.centerX, relation:.greaterThanOrEqual, relatedAttribute:.leading, useTargetView:true) } func testMakeCenterXGreaterThanTrailing() { - meta_testMake(.CenterX, relation:.GreaterThanOrEqual, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.centerX, relation:.greaterThanOrEqual, relatedAttribute:.trailing, useTargetView:false) } func testMakeCenterXGreaterThanTrailingOnTargetView() { - meta_testMake(.CenterX, relation:.GreaterThanOrEqual, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.centerX, relation:.greaterThanOrEqual, relatedAttribute:.trailing, useTargetView:true) } func testMakeCenterXGreaterThanCenterX() { - meta_testMake(.CenterX, relation:.GreaterThanOrEqual, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.centerX, relation:.greaterThanOrEqual, relatedAttribute:.centerX, useTargetView:false) } func testMakeCenterXGreaterThanCenterXOnTargetView() { - meta_testMake(.CenterX, relation:.GreaterThanOrEqual, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.centerX, relation:.greaterThanOrEqual, relatedAttribute:.centerX, useTargetView:true) } func testMakeCenterXGreaterThanCenterY() { - meta_testMake(.CenterX, relation:.GreaterThanOrEqual, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.centerX, relation:.greaterThanOrEqual, relatedAttribute:.centerY, useTargetView:false) } func testMakeCenterXGreaterThanCenterYOnTargetView() { - meta_testMake(.CenterX, relation:.GreaterThanOrEqual, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.centerX, relation:.greaterThanOrEqual, relatedAttribute:.centerY, useTargetView:true) } func testMakeCenterXGreaterThanBaseline() { - meta_testMake(.CenterX, relation:.GreaterThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.centerX, relation:.greaterThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeCenterXGreaterThanBaselineOnTargetView() { - meta_testMake(.CenterX, relation:.GreaterThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.centerX, relation:.greaterThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeCenterYGreaterThanLeft() { - meta_testMake(.CenterY, relation:.GreaterThanOrEqual, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.centerY, relation:.greaterThanOrEqual, relatedAttribute:.left, useTargetView:false) } func testMakeCenterYGreaterThanLeftOnTargetView() { - meta_testMake(.CenterY, relation:.GreaterThanOrEqual, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.centerY, relation:.greaterThanOrEqual, relatedAttribute:.left, useTargetView:true) } func testMakeCenterYGreaterThanRight() { - meta_testMake(.CenterY, relation:.GreaterThanOrEqual, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.centerY, relation:.greaterThanOrEqual, relatedAttribute:.right, useTargetView:false) } func testMakeCenterYGreaterThanRightOnTargetView() { - meta_testMake(.CenterY, relation:.GreaterThanOrEqual, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.centerY, relation:.greaterThanOrEqual, relatedAttribute:.right, useTargetView:true) } func testMakeCenterYGreaterThanTop() { - meta_testMake(.CenterY, relation:.GreaterThanOrEqual, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.centerY, relation:.greaterThanOrEqual, relatedAttribute:.top, useTargetView:false) } func testMakeCenterYGreaterThanTopOnTargetView() { - meta_testMake(.CenterY, relation:.GreaterThanOrEqual, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.centerY, relation:.greaterThanOrEqual, relatedAttribute:.top, useTargetView:true) } func testMakeCenterYGreaterThanBottom() { - meta_testMake(.CenterY, relation:.GreaterThanOrEqual, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.centerY, relation:.greaterThanOrEqual, relatedAttribute:.bottom, useTargetView:false) } func testMakeCenterYGreaterThanBottomOnTargetView() { - meta_testMake(.CenterY, relation:.GreaterThanOrEqual, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.centerY, relation:.greaterThanOrEqual, relatedAttribute:.bottom, useTargetView:true) } func testMakeCenterYGreaterThanLeading() { - meta_testMake(.CenterY, relation:.GreaterThanOrEqual, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.centerY, relation:.greaterThanOrEqual, relatedAttribute:.leading, useTargetView:false) } func testMakeCenterYGreaterThanLeadingOnTargetView() { - meta_testMake(.CenterY, relation:.GreaterThanOrEqual, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.centerY, relation:.greaterThanOrEqual, relatedAttribute:.leading, useTargetView:true) } func testMakeCenterYGreaterThanTrailing() { - meta_testMake(.CenterY, relation:.GreaterThanOrEqual, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.centerY, relation:.greaterThanOrEqual, relatedAttribute:.trailing, useTargetView:false) } func testMakeCenterYGreaterThanTrailingOnTargetView() { - meta_testMake(.CenterY, relation:.GreaterThanOrEqual, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.centerY, relation:.greaterThanOrEqual, relatedAttribute:.trailing, useTargetView:true) } func testMakeCenterYGreaterThanCenterX() { - meta_testMake(.CenterY, relation:.GreaterThanOrEqual, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.centerY, relation:.greaterThanOrEqual, relatedAttribute:.centerX, useTargetView:false) } func testMakeCenterYGreaterThanCenterXOnTargetView() { - meta_testMake(.CenterY, relation:.GreaterThanOrEqual, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.centerY, relation:.greaterThanOrEqual, relatedAttribute:.centerX, useTargetView:true) } func testMakeCenterYGreaterThanCenterY() { - meta_testMake(.CenterY, relation:.GreaterThanOrEqual, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.centerY, relation:.greaterThanOrEqual, relatedAttribute:.centerY, useTargetView:false) } func testMakeCenterYGreaterThanCenterYOnTargetView() { - meta_testMake(.CenterY, relation:.GreaterThanOrEqual, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.centerY, relation:.greaterThanOrEqual, relatedAttribute:.centerY, useTargetView:true) } func testMakeCenterYGreaterThanBaseline() { - meta_testMake(.CenterY, relation:.GreaterThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.centerY, relation:.greaterThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeCenterYGreaterThanBaselineOnTargetView() { - meta_testMake(.CenterY, relation:.GreaterThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.centerY, relation:.greaterThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeBaselineGreaterThanLeft() { - meta_testMake(.LastBaseline, relation:.GreaterThanOrEqual, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.lastBaseline, relation:.greaterThanOrEqual, relatedAttribute:.left, useTargetView:false) } func testMakeBaselineGreaterThanLeftOnTargetView() { - meta_testMake(.LastBaseline, relation:.GreaterThanOrEqual, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.lastBaseline, relation:.greaterThanOrEqual, relatedAttribute:.left, useTargetView:true) } func testMakeBaselineGreaterThanRight() { - meta_testMake(.LastBaseline, relation:.GreaterThanOrEqual, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.lastBaseline, relation:.greaterThanOrEqual, relatedAttribute:.right, useTargetView:false) } func testMakeBaselineGreaterThanRightOnTargetView() { - meta_testMake(.LastBaseline, relation:.GreaterThanOrEqual, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.lastBaseline, relation:.greaterThanOrEqual, relatedAttribute:.right, useTargetView:true) } func testMakeBaselineGreaterThanTop() { - meta_testMake(.LastBaseline, relation:.GreaterThanOrEqual, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.lastBaseline, relation:.greaterThanOrEqual, relatedAttribute:.top, useTargetView:false) } func testMakeBaselineGreaterThanTopOnTargetView() { - meta_testMake(.LastBaseline, relation:.GreaterThanOrEqual, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.lastBaseline, relation:.greaterThanOrEqual, relatedAttribute:.top, useTargetView:true) } func testMakeBaselineGreaterThanBottom() { - meta_testMake(.LastBaseline, relation:.GreaterThanOrEqual, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.lastBaseline, relation:.greaterThanOrEqual, relatedAttribute:.bottom, useTargetView:false) } func testMakeBaselineGreaterThanBottomOnTargetView() { - meta_testMake(.LastBaseline, relation:.GreaterThanOrEqual, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.lastBaseline, relation:.greaterThanOrEqual, relatedAttribute:.bottom, useTargetView:true) } func testMakeBaselineGreaterThanLeading() { - meta_testMake(.LastBaseline, relation:.GreaterThanOrEqual, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.lastBaseline, relation:.greaterThanOrEqual, relatedAttribute:.leading, useTargetView:false) } func testMakeBaselineGreaterThanLeadingOnTargetView() { - meta_testMake(.LastBaseline, relation:.GreaterThanOrEqual, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.lastBaseline, relation:.greaterThanOrEqual, relatedAttribute:.leading, useTargetView:true) } func testMakeBaselineGreaterThanTrailing() { - meta_testMake(.LastBaseline, relation:.GreaterThanOrEqual, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.lastBaseline, relation:.greaterThanOrEqual, relatedAttribute:.trailing, useTargetView:false) } func testMakeBaselineGreaterThanTrailingOnTargetView() { - meta_testMake(.LastBaseline, relation:.GreaterThanOrEqual, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.lastBaseline, relation:.greaterThanOrEqual, relatedAttribute:.trailing, useTargetView:true) } func testMakeBaselineGreaterThanCenterX() { - meta_testMake(.LastBaseline, relation:.GreaterThanOrEqual, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.lastBaseline, relation:.greaterThanOrEqual, relatedAttribute:.centerX, useTargetView:false) } func testMakeBaselineGreaterThanCenterXOnTargetView() { - meta_testMake(.LastBaseline, relation:.GreaterThanOrEqual, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.lastBaseline, relation:.greaterThanOrEqual, relatedAttribute:.centerX, useTargetView:true) } func testMakeBaselineGreaterThanCenterY() { - meta_testMake(.LastBaseline, relation:.GreaterThanOrEqual, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.lastBaseline, relation:.greaterThanOrEqual, relatedAttribute:.centerY, useTargetView:false) } func testMakeBaselineGreaterThanCenterYOnTargetView() { - meta_testMake(.LastBaseline, relation:.GreaterThanOrEqual, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.lastBaseline, relation:.greaterThanOrEqual, relatedAttribute:.centerY, useTargetView:true) } func testMakeBaselineGreaterThanBaseline() { - meta_testMake(.LastBaseline, relation:.GreaterThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.lastBaseline, relation:.greaterThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeBaselineGreaterThanBaselineOnTargetView() { - meta_testMake(.LastBaseline, relation:.GreaterThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.lastBaseline, relation:.greaterThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:true) } // MARK: - TESTS: MAKE/LESSTHAN @@ -1365,619 +1365,619 @@ class LayoutTests: XCTestCase { func testMakeLeftLessThanLeft() { - meta_testMake(.Left, relation:.LessThanOrEqual, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.left, relation:.lessThanOrEqual, relatedAttribute:.left, useTargetView:false) } func testMakeLeftLessThanLeftOnTargetView() { - meta_testMake(.Left, relation:.LessThanOrEqual, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.left, relation:.lessThanOrEqual, relatedAttribute:.left, useTargetView:true) } func testMakeLeftLessThanRight() { - meta_testMake(.Left, relation:.LessThanOrEqual, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.left, relation:.lessThanOrEqual, relatedAttribute:.right, useTargetView:false) } func testMakeLeftLessThanRightOnTargetView() { - meta_testMake(.Left, relation:.LessThanOrEqual, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.left, relation:.lessThanOrEqual, relatedAttribute:.right, useTargetView:true) } func testMakeLeftLessThanTop() { - meta_testMake(.Left, relation:.LessThanOrEqual, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.left, relation:.lessThanOrEqual, relatedAttribute:.top, useTargetView:false) } func testMakeLeftLessThanTopOnTargetView() { - meta_testMake(.Left, relation:.LessThanOrEqual, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.left, relation:.lessThanOrEqual, relatedAttribute:.top, useTargetView:true) } func testMakeLeftLessThanBottom() { - meta_testMake(.Left, relation:.LessThanOrEqual, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.left, relation:.lessThanOrEqual, relatedAttribute:.bottom, useTargetView:false) } func testMakeLeftLessThanBottomOnTargetView() { - meta_testMake(.Left, relation:.LessThanOrEqual, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.left, relation:.lessThanOrEqual, relatedAttribute:.bottom, useTargetView:true) } func testMakeLeftLessThanCenterX() { - meta_testMake(.Left, relation:.LessThanOrEqual, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.left, relation:.lessThanOrEqual, relatedAttribute:.centerX, useTargetView:false) } func testMakeLeftLessThanCenterXOnTargetView() { - meta_testMake(.Left, relation:.LessThanOrEqual, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.left, relation:.lessThanOrEqual, relatedAttribute:.centerX, useTargetView:true) } func testMakeLeftLessThanCenterY() { - meta_testMake(.Left, relation:.LessThanOrEqual, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.left, relation:.lessThanOrEqual, relatedAttribute:.centerY, useTargetView:false) } func testMakeLeftLessThanCenterYOnTargetView() { - meta_testMake(.Left, relation:.LessThanOrEqual, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.left, relation:.lessThanOrEqual, relatedAttribute:.centerY, useTargetView:true) } func testMakeLeftLessThanBaseline() { - meta_testMake(.Left, relation:.LessThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.left, relation:.lessThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeLeftLessThanBaselineOnTargetView() { - meta_testMake(.Left, relation:.LessThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.left, relation:.lessThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeRightLessThanLeft() { - meta_testMake(.Right, relation:.LessThanOrEqual, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.right, relation:.lessThanOrEqual, relatedAttribute:.left, useTargetView:false) } func testMakeRightLessThanLeftOnTargetView() { - meta_testMake(.Right, relation:.LessThanOrEqual, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.right, relation:.lessThanOrEqual, relatedAttribute:.left, useTargetView:true) } func testMakeRightLessThanRight() { - meta_testMake(.Right, relation:.LessThanOrEqual, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.right, relation:.lessThanOrEqual, relatedAttribute:.right, useTargetView:false) } func testMakeRightLessThanRightOnTargetView() { - meta_testMake(.Right, relation:.LessThanOrEqual, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.right, relation:.lessThanOrEqual, relatedAttribute:.right, useTargetView:true) } func testMakeRightLessThanTop() { - meta_testMake(.Right, relation:.LessThanOrEqual, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.right, relation:.lessThanOrEqual, relatedAttribute:.top, useTargetView:false) } func testMakeRightLessThanTopOnTargetView() { - meta_testMake(.Right, relation:.LessThanOrEqual, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.right, relation:.lessThanOrEqual, relatedAttribute:.top, useTargetView:true) } func testMakeRightLessThanBottom() { - meta_testMake(.Right, relation:.LessThanOrEqual, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.right, relation:.lessThanOrEqual, relatedAttribute:.bottom, useTargetView:false) } func testMakeRightLessThanBottomOnTargetView() { - meta_testMake(.Right, relation:.LessThanOrEqual, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.right, relation:.lessThanOrEqual, relatedAttribute:.bottom, useTargetView:true) } func testMakeRightLessThanCenterX() { - meta_testMake(.Right, relation:.LessThanOrEqual, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.right, relation:.lessThanOrEqual, relatedAttribute:.centerX, useTargetView:false) } func testMakeRightLessThanCenterXOnTargetView() { - meta_testMake(.Right, relation:.LessThanOrEqual, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.right, relation:.lessThanOrEqual, relatedAttribute:.centerX, useTargetView:true) } func testMakeRightLessThanCenterY() { - meta_testMake(.Right, relation:.LessThanOrEqual, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.right, relation:.lessThanOrEqual, relatedAttribute:.centerY, useTargetView:false) } func testMakeRightLessThanCenterYOnTargetView() { - meta_testMake(.Right, relation:.LessThanOrEqual, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.right, relation:.lessThanOrEqual, relatedAttribute:.centerY, useTargetView:true) } func testMakeRightLessThanBaseline() { - meta_testMake(.Right, relation:.LessThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.right, relation:.lessThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeRightLessThanBaselineOnTargetView() { - meta_testMake(.Right, relation:.LessThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.right, relation:.lessThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeTopLessThanLeft() { - meta_testMake(.Top, relation:.LessThanOrEqual, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.top, relation:.lessThanOrEqual, relatedAttribute:.left, useTargetView:false) } func testMakeTopLessThanLeftOnTargetView() { - meta_testMake(.Top, relation:.LessThanOrEqual, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.top, relation:.lessThanOrEqual, relatedAttribute:.left, useTargetView:true) } func testMakeTopLessThanRight() { - meta_testMake(.Top, relation:.LessThanOrEqual, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.top, relation:.lessThanOrEqual, relatedAttribute:.right, useTargetView:false) } func testMakeTopLessThanRightOnTargetView() { - meta_testMake(.Top, relation:.LessThanOrEqual, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.top, relation:.lessThanOrEqual, relatedAttribute:.right, useTargetView:true) } func testMakeTopLessThanTop() { - meta_testMake(.Top, relation:.LessThanOrEqual, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.top, relation:.lessThanOrEqual, relatedAttribute:.top, useTargetView:false) } func testMakeTopLessThanTopOnTargetView() { - meta_testMake(.Top, relation:.LessThanOrEqual, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.top, relation:.lessThanOrEqual, relatedAttribute:.top, useTargetView:true) } func testMakeTopLessThanBottom() { - meta_testMake(.Top, relation:.LessThanOrEqual, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.top, relation:.lessThanOrEqual, relatedAttribute:.bottom, useTargetView:false) } func testMakeTopLessThanBottomOnTargetView() { - meta_testMake(.Top, relation:.LessThanOrEqual, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.top, relation:.lessThanOrEqual, relatedAttribute:.bottom, useTargetView:true) } func testMakeTopLessThanLeading() { - meta_testMake(.Top, relation:.LessThanOrEqual, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.top, relation:.lessThanOrEqual, relatedAttribute:.leading, useTargetView:false) } func testMakeTopLessThanLeadingOnTargetView() { - meta_testMake(.Top, relation:.LessThanOrEqual, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.top, relation:.lessThanOrEqual, relatedAttribute:.leading, useTargetView:true) } func testMakeTopLessThanTrailing() { - meta_testMake(.Top, relation:.LessThanOrEqual, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.top, relation:.lessThanOrEqual, relatedAttribute:.trailing, useTargetView:false) } func testMakeTopLessThanTrailingOnTargetView() { - meta_testMake(.Top, relation:.LessThanOrEqual, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.top, relation:.lessThanOrEqual, relatedAttribute:.trailing, useTargetView:true) } func testMakeTopLessThanCenterX() { - meta_testMake(.Top, relation:.LessThanOrEqual, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.top, relation:.lessThanOrEqual, relatedAttribute:.centerX, useTargetView:false) } func testMakeTopLessThanCenterXOnTargetView() { - meta_testMake(.Top, relation:.LessThanOrEqual, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.top, relation:.lessThanOrEqual, relatedAttribute:.centerX, useTargetView:true) } func testMakeTopLessThanCenterY() { - meta_testMake(.Top, relation:.LessThanOrEqual, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.top, relation:.lessThanOrEqual, relatedAttribute:.centerY, useTargetView:false) } func testMakeTopLessThanCenterYOnTargetView() { - meta_testMake(.Top, relation:.LessThanOrEqual, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.top, relation:.lessThanOrEqual, relatedAttribute:.centerY, useTargetView:true) } func testMakeTopLessThanBaseline() { - meta_testMake(.Top, relation:.LessThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.top, relation:.lessThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeTopLessThanBaselineOnTargetView() { - meta_testMake(.Top, relation:.LessThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.top, relation:.lessThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeBottomLessThanLeft() { - meta_testMake(.Bottom, relation:.LessThanOrEqual, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.bottom, relation:.lessThanOrEqual, relatedAttribute:.left, useTargetView:false) } func testMakeBottomLessThanLeftOnTargetView() { - meta_testMake(.Bottom, relation:.LessThanOrEqual, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.bottom, relation:.lessThanOrEqual, relatedAttribute:.left, useTargetView:true) } func testMakeBottomLessThanRight() { - meta_testMake(.Bottom, relation:.LessThanOrEqual, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.bottom, relation:.lessThanOrEqual, relatedAttribute:.right, useTargetView:false) } func testMakeBottomLessThanRightOnTargetView() { - meta_testMake(.Bottom, relation:.LessThanOrEqual, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.bottom, relation:.lessThanOrEqual, relatedAttribute:.right, useTargetView:true) } func testMakeBottomLessThanTop() { - meta_testMake(.Bottom, relation:.LessThanOrEqual, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.bottom, relation:.lessThanOrEqual, relatedAttribute:.top, useTargetView:false) } func testMakeBottomLessThanTopOnTargetView() { - meta_testMake(.Bottom, relation:.LessThanOrEqual, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.bottom, relation:.lessThanOrEqual, relatedAttribute:.top, useTargetView:true) } func testMakeBottomLessThanBottom() { - meta_testMake(.Bottom, relation:.LessThanOrEqual, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.bottom, relation:.lessThanOrEqual, relatedAttribute:.bottom, useTargetView:false) } func testMakeBottomLessThanBottomOnTargetView() { - meta_testMake(.Bottom, relation:.LessThanOrEqual, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.bottom, relation:.lessThanOrEqual, relatedAttribute:.bottom, useTargetView:true) } func testMakeBottomLessThanLeading() { - meta_testMake(.Bottom, relation:.LessThanOrEqual, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.bottom, relation:.lessThanOrEqual, relatedAttribute:.leading, useTargetView:false) } func testMakeBottomLessThanLeadingOnTargetView() { - meta_testMake(.Bottom, relation:.LessThanOrEqual, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.bottom, relation:.lessThanOrEqual, relatedAttribute:.leading, useTargetView:true) } func testMakeBottomLessThanTrailing() { - meta_testMake(.Bottom, relation:.LessThanOrEqual, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.bottom, relation:.lessThanOrEqual, relatedAttribute:.trailing, useTargetView:false) } func testMakeBottomLessThanTrailingOnTargetView() { - meta_testMake(.Bottom, relation:.LessThanOrEqual, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.bottom, relation:.lessThanOrEqual, relatedAttribute:.trailing, useTargetView:true) } func testMakeBottomLessThanCenterX() { - meta_testMake(.Bottom, relation:.LessThanOrEqual, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.bottom, relation:.lessThanOrEqual, relatedAttribute:.centerX, useTargetView:false) } func testMakeBottomLessThanCenterXOnTargetView() { - meta_testMake(.Bottom, relation:.LessThanOrEqual, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.bottom, relation:.lessThanOrEqual, relatedAttribute:.centerX, useTargetView:true) } func testMakeBottomLessThanCenterY() { - meta_testMake(.Bottom, relation:.LessThanOrEqual, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.bottom, relation:.lessThanOrEqual, relatedAttribute:.centerY, useTargetView:false) } func testMakeBottomLessThanCenterYOnTargetView() { - meta_testMake(.Bottom, relation:.LessThanOrEqual, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.bottom, relation:.lessThanOrEqual, relatedAttribute:.centerY, useTargetView:true) } func testMakeBottomLessThanBaseline() { - meta_testMake(.Bottom, relation:.LessThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.bottom, relation:.lessThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeBottomLessThanBaselineOnTargetView() { - meta_testMake(.Bottom, relation:.LessThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.bottom, relation:.lessThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeLeadingLessThanTop() { - meta_testMake(.Leading, relation:.LessThanOrEqual, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.leading, relation:.lessThanOrEqual, relatedAttribute:.top, useTargetView:false) } func testMakeLeadingLessThanTopOnTargetView() { - meta_testMake(.Leading, relation:.LessThanOrEqual, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.leading, relation:.lessThanOrEqual, relatedAttribute:.top, useTargetView:true) } func testMakeLeadingLessThanBottom() { - meta_testMake(.Leading, relation:.LessThanOrEqual, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.leading, relation:.lessThanOrEqual, relatedAttribute:.bottom, useTargetView:false) } func testMakeLeadingLessThanBottomOnTargetView() { - meta_testMake(.Leading, relation:.LessThanOrEqual, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.leading, relation:.lessThanOrEqual, relatedAttribute:.bottom, useTargetView:true) } func testMakeLeadingLessThanLeading() { - meta_testMake(.Leading, relation:.LessThanOrEqual, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.leading, relation:.lessThanOrEqual, relatedAttribute:.leading, useTargetView:false) } func testMakeLeadingLessThanLeadingOnTargetView() { - meta_testMake(.Leading, relation:.LessThanOrEqual, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.leading, relation:.lessThanOrEqual, relatedAttribute:.leading, useTargetView:true) } func testMakeLeadingLessThanTrailing() { - meta_testMake(.Leading, relation:.LessThanOrEqual, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.leading, relation:.lessThanOrEqual, relatedAttribute:.trailing, useTargetView:false) } func testMakeLeadingLessThanTrailingOnTargetView() { - meta_testMake(.Leading, relation:.LessThanOrEqual, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.leading, relation:.lessThanOrEqual, relatedAttribute:.trailing, useTargetView:true) } func testMakeLeadingLessThanCenterX() { - meta_testMake(.Leading, relation:.LessThanOrEqual, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.leading, relation:.lessThanOrEqual, relatedAttribute:.centerX, useTargetView:false) } func testMakeLeadingLessThanCenterXOnTargetView() { - meta_testMake(.Leading, relation:.LessThanOrEqual, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.leading, relation:.lessThanOrEqual, relatedAttribute:.centerX, useTargetView:true) } func testMakeLeadingLessThanCenterY() { - meta_testMake(.Leading, relation:.LessThanOrEqual, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.leading, relation:.lessThanOrEqual, relatedAttribute:.centerY, useTargetView:false) } func testMakeLeadingLessThanCenterYOnTargetView() { - meta_testMake(.Leading, relation:.LessThanOrEqual, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.leading, relation:.lessThanOrEqual, relatedAttribute:.centerY, useTargetView:true) } func testMakeLeadingLessThanBaseline() { - meta_testMake(.Leading, relation:.LessThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.leading, relation:.lessThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeLeadingLessThanBaselineOnTargetView() { - meta_testMake(.Leading, relation:.LessThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.leading, relation:.lessThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeTrailingLessThanTop() { - meta_testMake(.Trailing, relation:.LessThanOrEqual, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.trailing, relation:.lessThanOrEqual, relatedAttribute:.top, useTargetView:false) } func testMakeTrailingLessThanTopOnTargetView() { - meta_testMake(.Trailing, relation:.LessThanOrEqual, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.trailing, relation:.lessThanOrEqual, relatedAttribute:.top, useTargetView:true) } func testMakeTrailingLessThanBottom() { - meta_testMake(.Trailing, relation:.LessThanOrEqual, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.trailing, relation:.lessThanOrEqual, relatedAttribute:.bottom, useTargetView:false) } func testMakeTrailingLessThanBottomOnTargetView() { - meta_testMake(.Trailing, relation:.LessThanOrEqual, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.trailing, relation:.lessThanOrEqual, relatedAttribute:.bottom, useTargetView:true) } func testMakeTrailingLessThanLeading() { - meta_testMake(.Trailing, relation:.LessThanOrEqual, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.trailing, relation:.lessThanOrEqual, relatedAttribute:.leading, useTargetView:false) } func testMakeTrailingLessThanLeadingOnTargetView() { - meta_testMake(.Trailing, relation:.LessThanOrEqual, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.trailing, relation:.lessThanOrEqual, relatedAttribute:.leading, useTargetView:true) } func testMakeTrailingLessThanTrailing() { - meta_testMake(.Trailing, relation:.LessThanOrEqual, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.trailing, relation:.lessThanOrEqual, relatedAttribute:.trailing, useTargetView:false) } func testMakeTrailingLessThanTrailingOnTargetView() { - meta_testMake(.Trailing, relation:.LessThanOrEqual, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.trailing, relation:.lessThanOrEqual, relatedAttribute:.trailing, useTargetView:true) } func testMakeTrailingLessThanCenterX() { - meta_testMake(.Trailing, relation:.LessThanOrEqual, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.trailing, relation:.lessThanOrEqual, relatedAttribute:.centerX, useTargetView:false) } func testMakeTrailingLessThanCenterXOnTargetView() { - meta_testMake(.Trailing, relation:.LessThanOrEqual, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.trailing, relation:.lessThanOrEqual, relatedAttribute:.centerX, useTargetView:true) } func testMakeTrailingLessThanCenterY() { - meta_testMake(.Trailing, relation:.LessThanOrEqual, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.trailing, relation:.lessThanOrEqual, relatedAttribute:.centerY, useTargetView:false) } func testMakeTrailingLessThanCenterYOnTargetView() { - meta_testMake(.Trailing, relation:.LessThanOrEqual, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.trailing, relation:.lessThanOrEqual, relatedAttribute:.centerY, useTargetView:true) } func testMakeTrailingLessThanBaseline() { - meta_testMake(.Trailing, relation:.LessThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.trailing, relation:.lessThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeTrailingLessThanBaselineOnTargetView() { - meta_testMake(.Trailing, relation:.LessThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.trailing, relation:.lessThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeWidthLessThanWidth() { - meta_testMake(.Width, relation:.LessThanOrEqual, relatedAttribute:.Width, useTargetView:false) + meta_testMake(.width, relation:.lessThanOrEqual, relatedAttribute:.width, useTargetView:false) } func testMakeWidthLessThanWidthOnTargetView() { - meta_testMake(.Width, relation:.LessThanOrEqual, relatedAttribute:.Width, useTargetView:true) + meta_testMake(.width, relation:.lessThanOrEqual, relatedAttribute:.width, useTargetView:true) } func testMakeWidthLessThanHeight() { - meta_testMake(.Width, relation:.LessThanOrEqual, relatedAttribute:.Height, useTargetView:false) + meta_testMake(.width, relation:.lessThanOrEqual, relatedAttribute:.height, useTargetView:false) } func testMakeWidthLessThanHeightOnTargetView() { - meta_testMake(.Width, relation:.LessThanOrEqual, relatedAttribute:.Height, useTargetView:true) + meta_testMake(.width, relation:.lessThanOrEqual, relatedAttribute:.height, useTargetView:true) } func testMakeHeightLessThanWidth() { - meta_testMake(.Height, relation:.LessThanOrEqual, relatedAttribute:.Width, useTargetView:false) + meta_testMake(.height, relation:.lessThanOrEqual, relatedAttribute:.width, useTargetView:false) } func testMakeHeightLessThanWidthOnTargetView() { - meta_testMake(.Height, relation:.LessThanOrEqual, relatedAttribute:.Width, useTargetView:true) + meta_testMake(.height, relation:.lessThanOrEqual, relatedAttribute:.width, useTargetView:true) } func testMakeHeightLessThanHeight() { - meta_testMake(.Height, relation:.LessThanOrEqual, relatedAttribute:.Height, useTargetView:false) + meta_testMake(.height, relation:.lessThanOrEqual, relatedAttribute:.height, useTargetView:false) } func testMakeHeightLessThanHeightOnTargetView() { - meta_testMake(.Height, relation:.LessThanOrEqual, relatedAttribute:.Height, useTargetView:true) + meta_testMake(.height, relation:.lessThanOrEqual, relatedAttribute:.height, useTargetView:true) } func testMakeCenterXLessThanLeft() { - meta_testMake(.CenterX, relation:.LessThanOrEqual, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.centerX, relation:.lessThanOrEqual, relatedAttribute:.left, useTargetView:false) } func testMakeCenterXLessThanLeftOnTargetView() { - meta_testMake(.CenterX, relation:.LessThanOrEqual, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.centerX, relation:.lessThanOrEqual, relatedAttribute:.left, useTargetView:true) } func testMakeCenterXLessThanRight() { - meta_testMake(.CenterX, relation:.LessThanOrEqual, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.centerX, relation:.lessThanOrEqual, relatedAttribute:.right, useTargetView:false) } func testMakeCenterXLessThanRightOnTargetView() { - meta_testMake(.CenterX, relation:.LessThanOrEqual, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.centerX, relation:.lessThanOrEqual, relatedAttribute:.right, useTargetView:true) } func testMakeCenterXLessThanTop() { - meta_testMake(.CenterX, relation:.LessThanOrEqual, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.centerX, relation:.lessThanOrEqual, relatedAttribute:.top, useTargetView:false) } func testMakeCenterXLessThanTopOnTargetView() { - meta_testMake(.CenterX, relation:.LessThanOrEqual, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.centerX, relation:.lessThanOrEqual, relatedAttribute:.top, useTargetView:true) } func testMakeCenterXLessThanBottom() { - meta_testMake(.CenterX, relation:.LessThanOrEqual, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.centerX, relation:.lessThanOrEqual, relatedAttribute:.bottom, useTargetView:false) } func testMakeCenterXLessThanBottomOnTargetView() { - meta_testMake(.CenterX, relation:.LessThanOrEqual, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.centerX, relation:.lessThanOrEqual, relatedAttribute:.bottom, useTargetView:true) } func testMakeCenterXLessThanLeading() { - meta_testMake(.CenterX, relation:.LessThanOrEqual, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.centerX, relation:.lessThanOrEqual, relatedAttribute:.leading, useTargetView:false) } func testMakeCenterXLessThanLeadingOnTargetView() { - meta_testMake(.CenterX, relation:.LessThanOrEqual, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.centerX, relation:.lessThanOrEqual, relatedAttribute:.leading, useTargetView:true) } func testMakeCenterXLessThanTrailing() { - meta_testMake(.CenterX, relation:.LessThanOrEqual, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.centerX, relation:.lessThanOrEqual, relatedAttribute:.trailing, useTargetView:false) } func testMakeCenterXLessThanTrailingOnTargetView() { - meta_testMake(.CenterX, relation:.LessThanOrEqual, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.centerX, relation:.lessThanOrEqual, relatedAttribute:.trailing, useTargetView:true) } func testMakeCenterXLessThanCenterX() { - meta_testMake(.CenterX, relation:.LessThanOrEqual, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.centerX, relation:.lessThanOrEqual, relatedAttribute:.centerX, useTargetView:false) } func testMakeCenterXLessThanCenterXOnTargetView() { - meta_testMake(.CenterX, relation:.LessThanOrEqual, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.centerX, relation:.lessThanOrEqual, relatedAttribute:.centerX, useTargetView:true) } func testMakeCenterXLessThanCenterY() { - meta_testMake(.CenterX, relation:.LessThanOrEqual, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.centerX, relation:.lessThanOrEqual, relatedAttribute:.centerY, useTargetView:false) } func testMakeCenterXLessThanCenterYOnTargetView() { - meta_testMake(.CenterX, relation:.LessThanOrEqual, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.centerX, relation:.lessThanOrEqual, relatedAttribute:.centerY, useTargetView:true) } func testMakeCenterXLessThanBaseline() { - meta_testMake(.CenterX, relation:.LessThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.centerX, relation:.lessThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeCenterXLessThanBaselineOnTargetView() { - meta_testMake(.CenterX, relation:.LessThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.centerX, relation:.lessThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeCenterYLessThanLeft() { - meta_testMake(.CenterY, relation:.LessThanOrEqual, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.centerY, relation:.lessThanOrEqual, relatedAttribute:.left, useTargetView:false) } func testMakeCenterYLessThanLeftOnTargetView() { - meta_testMake(.CenterY, relation:.LessThanOrEqual, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.centerY, relation:.lessThanOrEqual, relatedAttribute:.left, useTargetView:true) } func testMakeCenterYLessThanRight() { - meta_testMake(.CenterY, relation:.LessThanOrEqual, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.centerY, relation:.lessThanOrEqual, relatedAttribute:.right, useTargetView:false) } func testMakeCenterYLessThanRightOnTargetView() { - meta_testMake(.CenterY, relation:.LessThanOrEqual, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.centerY, relation:.lessThanOrEqual, relatedAttribute:.right, useTargetView:true) } func testMakeCenterYLessThanTop() { - meta_testMake(.CenterY, relation:.LessThanOrEqual, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.centerY, relation:.lessThanOrEqual, relatedAttribute:.top, useTargetView:false) } func testMakeCenterYLessThanTopOnTargetView() { - meta_testMake(.CenterY, relation:.LessThanOrEqual, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.centerY, relation:.lessThanOrEqual, relatedAttribute:.top, useTargetView:true) } func testMakeCenterYLessThanBottom() { - meta_testMake(.CenterY, relation:.LessThanOrEqual, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.centerY, relation:.lessThanOrEqual, relatedAttribute:.bottom, useTargetView:false) } func testMakeCenterYLessThanBottomOnTargetView() { - meta_testMake(.CenterY, relation:.LessThanOrEqual, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.centerY, relation:.lessThanOrEqual, relatedAttribute:.bottom, useTargetView:true) } func testMakeCenterYLessThanLeading() { - meta_testMake(.CenterY, relation:.LessThanOrEqual, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.centerY, relation:.lessThanOrEqual, relatedAttribute:.leading, useTargetView:false) } func testMakeCenterYLessThanLeadingOnTargetView() { - meta_testMake(.CenterY, relation:.LessThanOrEqual, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.centerY, relation:.lessThanOrEqual, relatedAttribute:.leading, useTargetView:true) } func testMakeCenterYLessThanTrailing() { - meta_testMake(.CenterY, relation:.LessThanOrEqual, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.centerY, relation:.lessThanOrEqual, relatedAttribute:.trailing, useTargetView:false) } func testMakeCenterYLessThanTrailingOnTargetView() { - meta_testMake(.CenterY, relation:.LessThanOrEqual, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.centerY, relation:.lessThanOrEqual, relatedAttribute:.trailing, useTargetView:true) } func testMakeCenterYLessThanCenterX() { - meta_testMake(.CenterY, relation:.LessThanOrEqual, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.centerY, relation:.lessThanOrEqual, relatedAttribute:.centerX, useTargetView:false) } func testMakeCenterYLessThanCenterXOnTargetView() { - meta_testMake(.CenterY, relation:.LessThanOrEqual, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.centerY, relation:.lessThanOrEqual, relatedAttribute:.centerX, useTargetView:true) } func testMakeCenterYLessThanCenterY() { - meta_testMake(.CenterY, relation:.LessThanOrEqual, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.centerY, relation:.lessThanOrEqual, relatedAttribute:.centerY, useTargetView:false) } func testMakeCenterYLessThanCenterYOnTargetView() { - meta_testMake(.CenterY, relation:.LessThanOrEqual, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.centerY, relation:.lessThanOrEqual, relatedAttribute:.centerY, useTargetView:true) } func testMakeCenterYLessThanBaseline() { - meta_testMake(.CenterY, relation:.LessThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.centerY, relation:.lessThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeCenterYLessThanBaselineOnTargetView() { - meta_testMake(.CenterY, relation:.LessThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.centerY, relation:.lessThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:true) } func testMakeBaselineLessThanLeft() { - meta_testMake(.LastBaseline, relation:.LessThanOrEqual, relatedAttribute:.Left, useTargetView:false) + meta_testMake(.lastBaseline, relation:.lessThanOrEqual, relatedAttribute:.left, useTargetView:false) } func testMakeBaselineLessThanLeftOnTargetView() { - meta_testMake(.LastBaseline, relation:.LessThanOrEqual, relatedAttribute:.Left, useTargetView:true) + meta_testMake(.lastBaseline, relation:.lessThanOrEqual, relatedAttribute:.left, useTargetView:true) } func testMakeBaselineLessThanRight() { - meta_testMake(.LastBaseline, relation:.LessThanOrEqual, relatedAttribute:.Right, useTargetView:false) + meta_testMake(.lastBaseline, relation:.lessThanOrEqual, relatedAttribute:.right, useTargetView:false) } func testMakeBaselineLessThanRightOnTargetView() { - meta_testMake(.LastBaseline, relation:.LessThanOrEqual, relatedAttribute:.Right, useTargetView:true) + meta_testMake(.lastBaseline, relation:.lessThanOrEqual, relatedAttribute:.right, useTargetView:true) } func testMakeBaselineLessThanTop() { - meta_testMake(.LastBaseline, relation:.LessThanOrEqual, relatedAttribute:.Top, useTargetView:false) + meta_testMake(.lastBaseline, relation:.lessThanOrEqual, relatedAttribute:.top, useTargetView:false) } func testMakeBaselineLessThanTopOnTargetView() { - meta_testMake(.LastBaseline, relation:.LessThanOrEqual, relatedAttribute:.Top, useTargetView:true) + meta_testMake(.lastBaseline, relation:.lessThanOrEqual, relatedAttribute:.top, useTargetView:true) } func testMakeBaselineLessThanBottom() { - meta_testMake(.LastBaseline, relation:.LessThanOrEqual, relatedAttribute:.Bottom, useTargetView:false) + meta_testMake(.lastBaseline, relation:.lessThanOrEqual, relatedAttribute:.bottom, useTargetView:false) } func testMakeBaselineLessThanBottomOnTargetView() { - meta_testMake(.LastBaseline, relation:.LessThanOrEqual, relatedAttribute:.Bottom, useTargetView:true) + meta_testMake(.lastBaseline, relation:.lessThanOrEqual, relatedAttribute:.bottom, useTargetView:true) } func testMakeBaselineLessThanLeading() { - meta_testMake(.LastBaseline, relation:.LessThanOrEqual, relatedAttribute:.Leading, useTargetView:false) + meta_testMake(.lastBaseline, relation:.lessThanOrEqual, relatedAttribute:.leading, useTargetView:false) } func testMakeBaselineLessThanLeadingOnTargetView() { - meta_testMake(.LastBaseline, relation:.LessThanOrEqual, relatedAttribute:.Leading, useTargetView:true) + meta_testMake(.lastBaseline, relation:.lessThanOrEqual, relatedAttribute:.leading, useTargetView:true) } func testMakeBaselineLessThanTrailing() { - meta_testMake(.LastBaseline, relation:.LessThanOrEqual, relatedAttribute:.Trailing, useTargetView:false) + meta_testMake(.lastBaseline, relation:.lessThanOrEqual, relatedAttribute:.trailing, useTargetView:false) } func testMakeBaselineLessThanTrailingOnTargetView() { - meta_testMake(.LastBaseline, relation:.LessThanOrEqual, relatedAttribute:.Trailing, useTargetView:true) + meta_testMake(.lastBaseline, relation:.lessThanOrEqual, relatedAttribute:.trailing, useTargetView:true) } func testMakeBaselineLessThanCenterX() { - meta_testMake(.LastBaseline, relation:.LessThanOrEqual, relatedAttribute:.CenterX, useTargetView:false) + meta_testMake(.lastBaseline, relation:.lessThanOrEqual, relatedAttribute:.centerX, useTargetView:false) } func testMakeBaselineLessThanCenterXOnTargetView() { - meta_testMake(.LastBaseline, relation:.LessThanOrEqual, relatedAttribute:.CenterX, useTargetView:true) + meta_testMake(.lastBaseline, relation:.lessThanOrEqual, relatedAttribute:.centerX, useTargetView:true) } func testMakeBaselineLessThanCenterY() { - meta_testMake(.LastBaseline, relation:.LessThanOrEqual, relatedAttribute:.CenterY, useTargetView:false) + meta_testMake(.lastBaseline, relation:.lessThanOrEqual, relatedAttribute:.centerY, useTargetView:false) } func testMakeBaselineLessThanCenterYOnTargetView() { - meta_testMake(.LastBaseline, relation:.LessThanOrEqual, relatedAttribute:.CenterY, useTargetView:true) + meta_testMake(.lastBaseline, relation:.lessThanOrEqual, relatedAttribute:.centerY, useTargetView:true) } func testMakeBaselineLessThanBaseline() { - meta_testMake(.LastBaseline, relation:.LessThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:false) + meta_testMake(.lastBaseline, relation:.lessThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:false) } func testMakeBaselineLessThanBaselineOnTargetView() { - meta_testMake(.LastBaseline, relation:.LessThanOrEqual, relatedAttribute:.LastBaseline, useTargetView:true) + meta_testMake(.lastBaseline, relation:.lessThanOrEqual, relatedAttribute:.lastBaseline, useTargetView:true) } } diff --git a/Manuscript-iOSTests/PriorityTests.swift b/Manuscript-iOSTests/PriorityTests.swift index 10fd853..bfed5f3 100644 --- a/Manuscript-iOSTests/PriorityTests.swift +++ b/Manuscript-iOSTests/PriorityTests.swift @@ -29,11 +29,11 @@ import Manuscript class PriorityTests: XCTestCase { - private var view: UIView = UIView(frame: CGRectZero) + fileprivate var view: UIView = UIView(frame: CGRect.zero) override func setUp() { super.setUp() - self.view = UIView(frame: CGRectZero) + self.view = UIView(frame: CGRect.zero) } override func tearDown() { @@ -45,7 +45,7 @@ class PriorityTests: XCTestCase { var layoutItem: LayoutItem? = nil Manuscript.layout(self.view) { c in - layoutItem = c.set(.Width, to: 100.0) + layoutItem = c.set(.width, to: 100.0) } XCTAssertEqual(layoutItem!.constraint.priority, 1000, "Expected Required Priority by Default") @@ -56,7 +56,7 @@ class PriorityTests: XCTestCase { Manuscript.layout(self.view) { c in c.setPriority(123) - layoutItem = c.set(.Width, to: 100.0) + layoutItem = c.set(.width, to: 100.0) } XCTAssertEqual(layoutItem!.constraint.priority, 123, "Expected explicit Priority of 123") @@ -67,7 +67,7 @@ class PriorityTests: XCTestCase { Manuscript.layout(self.view) { c in c.setPriority(0) - layoutItem = c.set(.Width, to: 100.0) + layoutItem = c.set(.width, to: 100.0) } XCTAssertEqual(layoutItem!.constraint.priority, 1, "Expected a lower cap of 1") @@ -78,7 +78,7 @@ class PriorityTests: XCTestCase { Manuscript.layout(self.view) { c in c.setPriority(1001) - layoutItem = c.set(.Width, to: 100.0) + layoutItem = c.set(.width, to: 100.0) } XCTAssertEqual(layoutItem!.constraint.priority, 1000, "Expected a upper cap of 1000") @@ -89,10 +89,10 @@ class PriorityTests: XCTestCase { Manuscript.layout(self.view) { c in c.setPriority(123) - c.set(.Height, to: 100.0) + c.set(.height, to: 100.0) c.setPriorityRequired() - layoutItem = c.set(.Width, to: 100.0) + layoutItem = c.set(.width, to: 100.0) } XCTAssertEqual(layoutItem!.constraint.priority, 1000, "Expected Required Priority") @@ -103,7 +103,7 @@ class PriorityTests: XCTestCase { Manuscript.layout(self.view) { c in c.setPriorityRequired() - layoutItem = c.set(.Width, to: 100.0) + layoutItem = c.set(.width, to: 100.0) } XCTAssertEqual(layoutItem!.constraint.priority, 1000, "Expected Required Priority (1000)") @@ -114,7 +114,7 @@ class PriorityTests: XCTestCase { Manuscript.layout(self.view) { c in c.setPriorityDefaultHigh() - layoutItem = c.set(.Width, to: 100.0) + layoutItem = c.set(.width, to: 100.0) } XCTAssertEqual(layoutItem!.constraint.priority, 750, "Expected Default High Priority (750)") @@ -125,7 +125,7 @@ class PriorityTests: XCTestCase { Manuscript.layout(self.view) { c in c.setPriorityDefaultLow() - layoutItem = c.set(.Width, to: 100.0) + layoutItem = c.set(.width, to: 100.0) } XCTAssertEqual(layoutItem!.constraint.priority, 250, "Expected Default High Priority (250)") @@ -136,7 +136,7 @@ class PriorityTests: XCTestCase { Manuscript.layout(self.view) { c in c.setPriorityFittingSizeLevel() - layoutItem = c.set(.Width, to: 100.0) + layoutItem = c.set(.width, to: 100.0) } XCTAssertEqual(layoutItem!.constraint.priority, 50, "Expected Default High Priority (250)") diff --git a/Manuscript-iOSTests/TargetViewTests.swift b/Manuscript-iOSTests/TargetViewTests.swift index 76bc41f..a11b6a8 100644 --- a/Manuscript-iOSTests/TargetViewTests.swift +++ b/Manuscript-iOSTests/TargetViewTests.swift @@ -30,11 +30,11 @@ import XCTest class TargetViewTests: XCTestCase { func testCreatesUnrelatedConstraintOnTheGivenItemWhenUsingSet() { - let view = UIView(frame: CGRectZero) + let view = UIView(frame: CGRect.zero) var layoutItem: LayoutItem? = nil Manuscript.layout(view) { c in - layoutItem = c.set(.Width, to: 100.0) + layoutItem = c.set(.width, to: 100.0) } if let aLayoutItem = layoutItem { @@ -45,14 +45,14 @@ class TargetViewTests: XCTestCase { } func testCreatedRelatedConstraintOnTheSpecifiedItemWhenUsingMakeOn() { - let parentView = UIView(frame: CGRectZero) - let childView = UIView(frame: CGRectZero) + let parentView = UIView(frame: CGRect.zero) + let childView = UIView(frame: CGRect.zero) parentView.addSubview(childView) var layoutItem: LayoutItem? = nil Manuscript.layout(childView) { c in - layoutItem = c.make(.Width, equalTo:parentView, s:.Width, on:parentView) + layoutItem = c.make(.width, equalTo:parentView, s:.width, on:parentView) } XCTAssertEqual(childView.constraints.count, 0, "") @@ -61,14 +61,14 @@ class TargetViewTests: XCTestCase { } func testCreatedRelatedConstraintOnTheParentItemWhenUsingMake() { - let parentView = UIView(frame: CGRectZero) - let childView = UIView(frame: CGRectZero) + let parentView = UIView(frame: CGRect.zero) + let childView = UIView(frame: CGRect.zero) parentView.addSubview(childView) var layoutItem: LayoutItem? = nil Manuscript.layout(childView) { c in - layoutItem = c.make(.Width, equalTo:parentView, s:.Width) + layoutItem = c.make(.width, equalTo:parentView, s:.width) } XCTAssertEqual(childView.constraints.count, 0, "") @@ -77,16 +77,16 @@ class TargetViewTests: XCTestCase { } func testCreatedRelatedConstraintOnTheCommonParentItemWhenUsingMake() { - let parentView = UIView(frame: CGRectZero) - let childView1 = UIView(frame: CGRectZero) - let childView2 = UIView(frame: CGRectZero) + let parentView = UIView(frame: CGRect.zero) + let childView1 = UIView(frame: CGRect.zero) + let childView2 = UIView(frame: CGRect.zero) parentView.addSubview(childView1) parentView.addSubview(childView2) var layoutItem: LayoutItem? = nil Manuscript.layout(childView1) { c in - layoutItem = c.make(.Width, equalTo:childView2, s:.Width) + layoutItem = c.make(.width, equalTo:childView2, s:.width) } XCTAssertEqual(childView1.constraints.count, 0, "") diff --git a/Manuscript-iOSTests/TestHelper.swift b/Manuscript-iOSTests/TestHelper.swift index ac4904e..4370f8e 100644 --- a/Manuscript-iOSTests/TestHelper.swift +++ b/Manuscript-iOSTests/TestHelper.swift @@ -29,12 +29,12 @@ import XCTest struct Helper { static func checkConstraint( - constraint: NSLayoutConstraint, + _ constraint: NSLayoutConstraint, item: UIView, attribute: NSLayoutAttribute, relation: NSLayoutRelation, relatedItem: UIView? = nil, - relatedAttribute: NSLayoutAttribute = .NotAnAttribute, + relatedAttribute: NSLayoutAttribute = .notAnAttribute, multiplier: CGFloat = 1.0, constant: CGFloat) { @@ -54,12 +54,12 @@ struct Helper { XCTAssertEqual(constraint.constant, constant, "") } - static func randomFloat(min: CGFloat = 0.0, max: CGFloat) -> CGFloat { + static func randomFloat(_ min: CGFloat = 0.0, max: CGFloat) -> CGFloat { let random = CGFloat(arc4random()) / CGFloat(UInt32.max) return random * (max - min) + min } - static func firstConstraint(view: UIView, withAttribute optionalAttribute: NSLayoutAttribute? = nil) -> NSLayoutConstraint? { + static func firstConstraint(_ view: UIView, withAttribute optionalAttribute: NSLayoutAttribute? = nil) -> NSLayoutConstraint? { if view.constraints.count > 0 { for constraint in view.constraints { if let attribute = optionalAttribute { @@ -78,47 +78,47 @@ struct Helper { extension NSLayoutAttribute : CustomStringConvertible { public var description: String { switch self { - case .Left: + case .left: return "Left" - case .Right: + case .right: return "Right" - case .Top: + case .top: return "Top" - case .Bottom: + case .bottom: return "Bottom" - case .Leading: + case .leading: return "Leading" - case .Trailing: + case .trailing: return "Trailing" - case .Width: + case .width: return "Width" - case .Height: + case .height: return "Height" - case .CenterX: + case .centerX: return "CenterX" - case .CenterY: + case .centerY: return "CenterY" - case .LastBaseline: + case .lastBaseline: return "Baseline" - case .FirstBaseline: + case .firstBaseline: return "FirstBaseline" - case .LeftMargin: + case .leftMargin: return "LeftMargin" - case .RightMargin: + case .rightMargin: return "RightMargin" - case .TopMargin: + case .topMargin: return "TopMargin" - case .BottomMargin: + case .bottomMargin: return "BottomMargin" - case .LeadingMargin: + case .leadingMargin: return "LeadingMargin" - case .TrailingMargin: + case .trailingMargin: return "TrailingMargin" - case .CenterXWithinMargins: + case .centerXWithinMargins: return "CenterXWithinMargins" - case .CenterYWithinMargins: + case .centerYWithinMargins: return "CenterYWithinMargins" - case .NotAnAttribute: + case .notAnAttribute: return "NotAnAttribute" } } diff --git a/Manuscript-tvOSTests/Manuscript_tvOSTests.swift b/Manuscript-tvOSTests/Manuscript_tvOSTests.swift index 8f1f612..d5190de 100644 --- a/Manuscript-tvOSTests/Manuscript_tvOSTests.swift +++ b/Manuscript-tvOSTests/Manuscript_tvOSTests.swift @@ -27,7 +27,7 @@ class Manuscript_tvOSTests: XCTestCase { func testPerformanceExample() { // This is an example of a performance test case. - self.measureBlock { + self.measure { // Put the code you want to measure the time of here. } } diff --git a/Manuscript.xcodeproj/project.pbxproj b/Manuscript.xcodeproj/project.pbxproj index c48e46f..a7ad72a 100644 --- a/Manuscript.xcodeproj/project.pbxproj +++ b/Manuscript.xcodeproj/project.pbxproj @@ -360,12 +360,18 @@ DF1CDF561CF092E70006B594 = { LastSwiftMigration = 0810; }; + DF1CDF641CF093040006B594 = { + LastSwiftMigration = 0810; + }; DF1CDFAE1CF095540006B594 = { LastSwiftMigration = 0810; }; DF1CDFD01CF095EF0006B594 = { LastSwiftMigration = 0810; }; + DF1CDFDF1CF095FA0006B594 = { + LastSwiftMigration = 0810; + }; }; }; buildConfigurationList = DF1CDF4F1CF092C60006B594 /* Build configuration list for PBXProject "Manuscript" */; @@ -609,7 +615,7 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -665,7 +671,7 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -727,7 +733,7 @@ SDKROOT = appletvos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; VERSIONING_SYSTEM = "apple-generic"; @@ -781,7 +787,7 @@ PRODUCT_NAME = Manuscript; SDKROOT = appletvos; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; VALIDATE_PRODUCT = YES; @@ -795,7 +801,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -838,7 +844,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -847,7 +853,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -882,7 +888,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.projectserver.Manuscript-Example"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -933,7 +939,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -975,7 +981,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.projectserver.Manuscript-iOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = iphoneos; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; VALIDATE_PRODUCT = YES; }; name = Release; @@ -1024,7 +1030,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TVOS_DEPLOYMENT_TARGET = 9.2; }; name = Debug; @@ -1065,7 +1071,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.projectserver.Manuscript-tvOSTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = appletvos; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TVOS_DEPLOYMENT_TARGET = 9.2; VALIDATE_PRODUCT = YES; }; diff --git a/Sources/LayoutProxy.swift b/Sources/LayoutProxy.swift index 305ce9d..6cf7f13 100644 --- a/Sources/LayoutProxy.swift +++ b/Sources/LayoutProxy.swift @@ -30,7 +30,7 @@ extension Manuscript { /// The `LayoutProxy` is responsible for creating all the constraints. - public class LayoutProxy: NSObject { + open class LayoutProxy: NSObject { let view: UIView let utils: ManuscriptUtils @@ -48,25 +48,25 @@ extension Manuscript { /// Set the priority for all constraints created *after* this call to `1000` - public func setPriorityRequired() { + open func setPriorityRequired() { self.internalPriority = 1000 } /// Set the priority for all constraints created *after* this call to `750` - public func setPriorityDefaultHigh() { + open func setPriorityDefaultHigh() { self.internalPriority = 750 } /// Set the priority for all constraints created *after* this call to `250` - public func setPriorityDefaultLow() { + open func setPriorityDefaultLow() { self.internalPriority = 250 } /// Set the priority for all constraints created *after* this call to `50` - public func setPriorityFittingSizeLevel() { + open func setPriorityFittingSizeLevel() { self.internalPriority = 50 } @@ -74,7 +74,7 @@ extension Manuscript { /// /// - parameter priority: A UILayoutPriority a.k.a. int between 0 and 1000 - public func setPriority(priority: UILayoutPriority) { + open func setPriority(_ priority: UILayoutPriority) { if priority > 1000 { self.internalPriority = 1000 print("UILayoutPriority only supports values between 1 and 1000. Setting to 1000 (while trying to set the priority to \(priority)).") @@ -98,8 +98,8 @@ extension Manuscript { /// /// - returns: a layout item whose target item is the view itself - public func set(attribute: NSLayoutAttribute, to constant: CGFloat, identifier: String? = nil) -> LayoutItem { - return self.set(self.view, attribute: attribute, relation: .Equal, constant: constant, priority: self.internalPriority, identifier: identifier) + @discardableResult open func set(_ attribute: NSLayoutAttribute, to constant: CGFloat, identifier: String? = nil) -> LayoutItem { + return self.set(self.view, attribute: attribute, relation: .equal, constant: constant, priority: self.internalPriority, identifier: identifier) } /// Set a layout attribute to a specific constant using a `greaterThan` relation. This is mostly @@ -112,8 +112,8 @@ extension Manuscript { /// /// - returns: a layout item whose target item is the view itself - public func set(attribute: NSLayoutAttribute, toMoreThan constant: CGFloat, identifier: String? = nil) -> LayoutItem { - return self.set(self.view, attribute: attribute, relation: .GreaterThanOrEqual, constant: constant, priority: self.internalPriority, identifier: identifier) + @discardableResult open func set(_ attribute: NSLayoutAttribute, toMoreThan constant: CGFloat, identifier: String? = nil) -> LayoutItem { + return self.set(self.view, attribute: attribute, relation: .greaterThanOrEqual, constant: constant, priority: self.internalPriority, identifier: identifier) } /// Set a layout attribute to a specific constant using a `lessThan` relation. This is mostly @@ -126,8 +126,8 @@ extension Manuscript { /// /// - returns: a layout item whose target item is the view itself - public func set(attribute: NSLayoutAttribute, toLessThan constant: CGFloat, identifier: String? = nil) -> LayoutItem { - return self.set(self.view, attribute: attribute, relation: .LessThanOrEqual, constant: constant, priority: self.internalPriority, identifier: identifier) + @discardableResult open func set(_ attribute: NSLayoutAttribute, toLessThan constant: CGFloat, identifier: String? = nil) -> LayoutItem { + return self.set(self.view, attribute: attribute, relation: .lessThanOrEqual, constant: constant, priority: self.internalPriority, identifier: identifier) } // MARK: DSL (make) @@ -149,8 +149,8 @@ extension Manuscript { /// - returns: a layout item containing the created constraint as well as the target view on /// which the constraint was installed - public func make(attribute: NSLayoutAttribute, equalTo relatedItem: AnyObject, s relatedAttribute: NSLayoutAttribute, times multiplier: CGFloat = 1.0, plus constant: CGFloat = 0.0, minus negativeConstant: CGFloat = 0.0, on targetView: UIView? = nil, identifier: String? = nil) -> LayoutItem { - return self.make(self.view, attribute: attribute, relation: .Equal, relatedItem: relatedItem, relatedItemAttribute: relatedAttribute, multiplier: multiplier, constant: constant - negativeConstant, target: targetView, priority: self.internalPriority, identifier: identifier) + @discardableResult open func make(_ attribute: NSLayoutAttribute, equalTo relatedItem: AnyObject, s relatedAttribute: NSLayoutAttribute, times multiplier: CGFloat = 1.0, plus constant: CGFloat = 0.0, minus negativeConstant: CGFloat = 0.0, on targetView: UIView? = nil, identifier: String? = nil) -> LayoutItem { + return self.make(self.view, attribute: attribute, relation: .equal, relatedItem: relatedItem, relatedItemAttribute: relatedAttribute, multiplier: multiplier, constant: constant - negativeConstant, target: targetView, priority: self.internalPriority, identifier: identifier) } /// Align a given attribute to another views attributes using a `greaterThan` relation. @@ -170,8 +170,8 @@ extension Manuscript { /// - returns: a layout item containing the created constraint as well as the target view on /// which the constraint was installed - public func make(attribute: NSLayoutAttribute, greaterThan relatedItem: AnyObject, s relatedAttribute: NSLayoutAttribute, times multiplier: CGFloat = 1.0, plus constant: CGFloat = 0.0, minus negativeConstant: CGFloat = 0.0, on targetView: UIView? = nil, identifier: String? = nil) -> LayoutItem { - return self.make(self.view, attribute: attribute, relation: .GreaterThanOrEqual, relatedItem: relatedItem, relatedItemAttribute: relatedAttribute, multiplier: multiplier, constant: constant - negativeConstant, target: targetView, priority: self.internalPriority, identifier: identifier) + @discardableResult open func make(_ attribute: NSLayoutAttribute, greaterThan relatedItem: AnyObject, s relatedAttribute: NSLayoutAttribute, times multiplier: CGFloat = 1.0, plus constant: CGFloat = 0.0, minus negativeConstant: CGFloat = 0.0, on targetView: UIView? = nil, identifier: String? = nil) -> LayoutItem { + return self.make(self.view, attribute: attribute, relation: .greaterThanOrEqual, relatedItem: relatedItem, relatedItemAttribute: relatedAttribute, multiplier: multiplier, constant: constant - negativeConstant, target: targetView, priority: self.internalPriority, identifier: identifier) } /// Align a given attribute to another views attributes using a `lessThan` relation. @@ -191,8 +191,8 @@ extension Manuscript { /// - returns: a layout item containing the created constraint as well as the target view on /// which the constraint was installed - public func make(attribute: NSLayoutAttribute, lessThan relatedItem: AnyObject, s relatedAttribute: NSLayoutAttribute, times multiplier: CGFloat = 1.0, plus constant: CGFloat = 0.0, minus negativeConstant: CGFloat = 0.0, on targetView: UIView? = nil, identifier: String? = nil) -> LayoutItem { - return self.make(self.view, attribute: attribute, relation: .LessThanOrEqual, relatedItem: relatedItem, relatedItemAttribute: relatedAttribute, multiplier: multiplier, constant: constant - negativeConstant, target: targetView, priority: self.internalPriority, identifier: identifier) + @discardableResult open func make(_ attribute: NSLayoutAttribute, lessThan relatedItem: AnyObject, s relatedAttribute: NSLayoutAttribute, times multiplier: CGFloat = 1.0, plus constant: CGFloat = 0.0, minus negativeConstant: CGFloat = 0.0, on targetView: UIView? = nil, identifier: String? = nil) -> LayoutItem { + return self.make(self.view, attribute: attribute, relation: .lessThanOrEqual, relatedItem: relatedItem, relatedItemAttribute: relatedAttribute, multiplier: multiplier, constant: constant - negativeConstant, target: targetView, priority: self.internalPriority, identifier: identifier) } // MARK: DSL (convenience) @@ -213,12 +213,12 @@ extension Manuscript { /// /// - returns: an array of layout items in the order mentinoned above (left, top, right, bottom) - public func alignAllEdges(to relatedItem: UIView, withInsets insets: UIEdgeInsets = UIEdgeInsetsZero, identifier: String? = nil) -> [LayoutItem] { + @discardableResult open func alignAllEdges(to relatedItem: UIView, withInsets insets: UIEdgeInsets = UIEdgeInsets.zero, identifier: String? = nil) -> [LayoutItem] { var result: [LayoutItem] = [] - result.append(self.make(.Left, equalTo: relatedItem, s: .Left, plus: insets.left, identifier: Manuscript.suffixedIdFromId(identifier, suffix: "left"))) - result.append(self.make(.Top, equalTo: relatedItem, s: .Top, plus: insets.top, identifier: Manuscript.suffixedIdFromId(identifier, suffix: "top"))) - result.append(self.make(.Right, equalTo: relatedItem, s: .Right, minus: insets.right, identifier: Manuscript.suffixedIdFromId(identifier, suffix: "right"))) - result.append(self.make(.Bottom, equalTo: relatedItem, s: .Bottom, minus: insets.bottom, identifier: Manuscript.suffixedIdFromId(identifier, suffix: "bottom"))) + result.append(self.make(.left, equalTo: relatedItem, s: .left, plus: insets.left, identifier: Manuscript.suffixedIdFromId(identifier, suffix: "left"))) + result.append(self.make(.top, equalTo: relatedItem, s: .top, plus: insets.top, identifier: Manuscript.suffixedIdFromId(identifier, suffix: "top"))) + result.append(self.make(.right, equalTo: relatedItem, s: .right, minus: insets.right, identifier: Manuscript.suffixedIdFromId(identifier, suffix: "right"))) + result.append(self.make(.bottom, equalTo: relatedItem, s: .bottom, minus: insets.bottom, identifier: Manuscript.suffixedIdFromId(identifier, suffix: "bottom"))) return result } @@ -234,10 +234,10 @@ extension Manuscript { /// /// - returns: an array of layout items in the order mentinoned above (center x, center y) - public func centerIn(view: UIView, identifier: String? = nil) -> [LayoutItem] { + @discardableResult open func centerIn(_ view: UIView, identifier: String? = nil) -> [LayoutItem] { var result: [LayoutItem] = [] - result.append(self.make(.CenterX, equalTo: view, s: .CenterX, identifier: Manuscript.suffixedIdFromId(identifier, suffix: "center_x"))) - result.append(self.make(.CenterY, equalTo: view, s: .CenterY, identifier: Manuscript.suffixedIdFromId(identifier, suffix: "center_y"))) + result.append(self.make(.centerX, equalTo: view, s: .centerX, identifier: Manuscript.suffixedIdFromId(identifier, suffix: "center_x"))) + result.append(self.make(.centerY, equalTo: view, s: .centerY, identifier: Manuscript.suffixedIdFromId(identifier, suffix: "center_y"))) return result } @@ -252,10 +252,10 @@ extension Manuscript { /// /// - returns: an array of layout items in the order mentioned above (width, height) - public func setSize(size: CGSize, identifier: String? = nil) -> [LayoutItem] { + @discardableResult open func setSize(_ size: CGSize, identifier: String? = nil) -> [LayoutItem] { var result: [LayoutItem] = [] - result.append(self.set(.Height, to: size.height, identifier: Manuscript.suffixedIdFromId(identifier, suffix: "height"))) - result.append(self.set(.Width, to: size.width, identifier: Manuscript.suffixedIdFromId(identifier, suffix: "width"))) + result.append(self.set(.height, to: size.height, identifier: Manuscript.suffixedIdFromId(identifier, suffix: "height"))) + result.append(self.set(.width, to: size.width, identifier: Manuscript.suffixedIdFromId(identifier, suffix: "width"))) return result } @@ -268,11 +268,11 @@ extension Manuscript { /// /// - returns: a single layout item - public func makeVerticalHairline(identifier identifier: String? = nil) -> LayoutItem { + @discardableResult open func makeVerticalHairline(_ identifier: String? = nil) -> LayoutItem { if self.utils.isRetina() { - return self.set(.Width, to: 0.5, identifier: identifier) + return self.set(.width, to: 0.5, identifier: identifier) } - return self.set(.Width, to: 1.0, identifier: identifier) + return self.set(.width, to: 1.0, identifier: identifier) } /// Helper method to create a horizontal (left to right) hairline, resolution independent. This @@ -284,24 +284,24 @@ extension Manuscript { /// /// - returns: a single layout item - public func makeHorizontalHairline(identifier identifier: String? = nil) -> LayoutItem { + @discardableResult open func makeHorizontalHairline(_ identifier: String? = nil) -> LayoutItem { if self.utils.isRetina() { - return self.set(.Height, to: 0.5, identifier: identifier) + return self.set(.height, to: 0.5, identifier: identifier) } - return self.set(.Height, to: 1.0, identifier: identifier) + return self.set(.height, to: 1.0, identifier: identifier) } // MARK: Core - private func set(item: UIView, attribute: NSLayoutAttribute, relation: NSLayoutRelation, constant: CGFloat, priority: UILayoutPriority, identifier: String?) -> LayoutItem { - return self.createLayoutConstraint(item, attribute: attribute, relation: relation, relatedItem: nil, relatedItemAttribute: .NotAnAttribute, multiplier: 1.0, constant: constant, target: item, priority: priority, identifier: identifier) + fileprivate func set(_ item: UIView, attribute: NSLayoutAttribute, relation: NSLayoutRelation, constant: CGFloat, priority: UILayoutPriority, identifier: String?) -> LayoutItem { + return self.createLayoutConstraint(item, attribute: attribute, relation: relation, relatedItem: nil, relatedItemAttribute: .notAnAttribute, multiplier: 1.0, constant: constant, target: item, priority: priority, identifier: identifier) } - private func make(item: UIView, attribute: NSLayoutAttribute, relation: NSLayoutRelation, relatedItem: AnyObject, relatedItemAttribute: NSLayoutAttribute, multiplier: CGFloat, constant: CGFloat, target: UIView?, priority: UILayoutPriority, identifier: String?) -> LayoutItem { + fileprivate func make(_ item: UIView, attribute: NSLayoutAttribute, relation: NSLayoutRelation, relatedItem: AnyObject, relatedItemAttribute: NSLayoutAttribute, multiplier: CGFloat, constant: CGFloat, target: UIView?, priority: UILayoutPriority, identifier: String?) -> LayoutItem { return self.createLayoutConstraint(item, attribute: attribute, relation: relation, relatedItem: relatedItem, relatedItemAttribute: relatedItemAttribute, multiplier: multiplier, constant: constant, target: target, priority: priority, identifier: identifier) } - private func createLayoutConstraint(item: UIView, attribute: NSLayoutAttribute, relation: NSLayoutRelation, relatedItem: AnyObject?, relatedItemAttribute: NSLayoutAttribute, multiplier: CGFloat, constant: CGFloat, target aTarget: UIView?, priority: UILayoutPriority, identifier: String?) -> LayoutItem { + fileprivate func createLayoutConstraint(_ item: UIView, attribute: NSLayoutAttribute, relation: NSLayoutRelation, relatedItem: AnyObject?, relatedItemAttribute: NSLayoutAttribute, multiplier: CGFloat, constant: CGFloat, target aTarget: UIView?, priority: UILayoutPriority, identifier: String?) -> LayoutItem { let constraint = NSLayoutConstraint( item: item, @@ -320,13 +320,13 @@ extension Manuscript { } if #available(iOS 9.0, *) { - return self.iOS9_installConstraint(item: item, relatedItem: relatedItem, constraint: constraint) + return self.iOS9_installConstraint(item, relatedItem: relatedItem, constraint: constraint) } else { - return self.earlier_installConstraint(item: item, relatedItem: relatedItem, constraint: constraint) + return self.earlier_installConstraint(item, relatedItem: relatedItem, constraint: constraint) } } - private func iOS9_installConstraint(item item: UIView, relatedItem: AnyObject?, constraint: NSLayoutConstraint) -> LayoutItem { + fileprivate func iOS9_installConstraint(_ item: UIView, relatedItem: AnyObject?, constraint: NSLayoutConstraint) -> LayoutItem { if #available(iOS 9.0, *) { switch relatedItem { case let relatedView as UIView: @@ -349,7 +349,7 @@ extension Manuscript { } } - private func earlier_installConstraint(item item: UIView, relatedItem: AnyObject?, constraint: NSLayoutConstraint) -> LayoutItem { + fileprivate func earlier_installConstraint(_ item: UIView, relatedItem: AnyObject?, constraint: NSLayoutConstraint) -> LayoutItem { var relatedView: UIView? = nil if let aRelatedView = relatedItem as? UIView { relatedView = aRelatedView @@ -362,7 +362,7 @@ extension Manuscript { } } - private func installConstraint(constraint: NSLayoutConstraint, onTarget target: UIView) -> LayoutItem { + fileprivate func installConstraint(_ constraint: NSLayoutConstraint, onTarget target: UIView) -> LayoutItem { target.addConstraint(constraint) return (constraint, target) } diff --git a/Sources/Manuscript.swift b/Sources/Manuscript.swift index bb91c78..cf231df 100644 --- a/Sources/Manuscript.swift +++ b/Sources/Manuscript.swift @@ -55,7 +55,7 @@ public struct Manuscript { /// /// - returns: the `LayoutProxy` instance that is also handed to the `block` - public static func layout(view: UIView, + @discardableResult public static func layout(_ view: UIView, utils: ManuscriptUtils = Utils(), block: (LayoutProxy) -> () ) -> Manuscript.LayoutProxy @@ -65,7 +65,7 @@ public struct Manuscript { return layoutProxy } - static func findCommonSuperview(a: UIView, b: UIView?) -> UIView? { + static func findCommonSuperview(_ a: UIView, b: UIView?) -> UIView? { if let b = b { @@ -78,7 +78,7 @@ public struct Manuscript { // None of those; run the general algorithm let ancestorsOfA = NSSet(array: Array(ancestors(a))) for ancestor in ancestors(b) { - if ancestorsOfA.containsObject(ancestor) { + if ancestorsOfA.contains(ancestor) { return ancestor } } @@ -88,10 +88,10 @@ public struct Manuscript { return a // b is nil } - static func ancestors(v: UIView) -> AnySequence { - return AnySequence { () -> AnyGenerator in + static func ancestors(_ v: UIView) -> AnySequence { + return AnySequence { () -> AnyIterator in var view: UIView? = v - return AnyGenerator { + return AnyIterator { let current = view view = view?.superview return current @@ -101,11 +101,11 @@ public struct Manuscript { struct Utils: ManuscriptUtils { func isRetina() -> Bool { - return UIScreen.mainScreen().scale > 1.0 + return UIScreen.main.scale > 1.0 } } - static func suffixedIdFromId(identifier: String?, suffix: String) -> String { + static func suffixedIdFromId(_ identifier: String?, suffix: String) -> String { let id = identifier ?? Manuscript.defaultIdentifier return "\(id)_\(suffix)" } From ee14b9d6eafb4b4bef20a10b3df814c0e0b697e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Kr=C3=BCger?= Date: Tue, 4 Oct 2016 15:28:16 +0200 Subject: [PATCH 5/9] fixes runtime error in example app the target config contained the "Main Interface" setting --- Manuscript-Example/Info.plist | 2 -- 1 file changed, 2 deletions(-) diff --git a/Manuscript-Example/Info.plist b/Manuscript-Example/Info.plist index c5383f5..2498527 100644 --- a/Manuscript-Example/Info.plist +++ b/Manuscript-Example/Info.plist @@ -24,8 +24,6 @@ UILaunchStoryboardName LaunchScreen - UIMainStoryboardFile - Main UIRequiredDeviceCapabilities armv7 From d27872b72db95bc2d42ee67fe0789dc7f6e74459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Kr=C3=BCger?= Date: Tue, 4 Oct 2016 15:52:00 +0200 Subject: [PATCH 6/9] uses Xcode 8.0 for CircleCI --- circle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index 2a649dc..8139742 100644 --- a/circle.yml +++ b/circle.yml @@ -6,7 +6,7 @@ general: machine: xcode: - version: "7.3" + version: "8.0" test: override: @@ -24,4 +24,4 @@ test: tee $CIRCLE_ARTIFACTS/xcode_raw_ios.log | xcpretty --color --report junit --output $CIRCLE_TEST_REPORTS/xcode/ios-results.xml post: - - bash <(curl -s https://codecov.io/bash) -J Manuscript \ No newline at end of file + - bash <(curl -s https://codecov.io/bash) -J Manuscript From 0548bdf6074d14db0674fadd8db75461adf3877c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Kr=C3=BCger?= Date: Tue, 4 Oct 2016 15:55:39 +0200 Subject: [PATCH 7/9] uses iPhone 7 and iOS 10.0 for UnitTests --- circle.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index 8139742..cac6caa 100644 --- a/circle.yml +++ b/circle.yml @@ -14,8 +14,8 @@ test: xcodebuild -workspace Manuscript.xcworkspace/ -scheme Manuscript-iOS - -sdk iphonesimulator9.3 - -destination 'platform=iOS Simulator,OS=9.0,name=iPhone 6' + -sdk iphonesimulator10.0 + -destination 'platform=iOS Simulator,OS=10.0,name=iPhone 7' clean test ONLY_ACTIVE_ARCH=NO TEST_AFTER_BUILD=YES From 65b28a05acd890b646c9bdd3b08e5af5e08b5e46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Kr=C3=BCger?= Date: Tue, 18 Oct 2016 13:43:35 +0200 Subject: [PATCH 8/9] [MTC] removes unnecessary self references in examples --- .../SimpleButtonExampleViewController.swift | 118 +++++++++--------- README.md | 56 ++++----- 2 files changed, 87 insertions(+), 87 deletions(-) diff --git a/Manuscript-Example/Examples/SimpleButtonExample/SimpleButtonExampleViewController.swift b/Manuscript-Example/Examples/SimpleButtonExample/SimpleButtonExampleViewController.swift index cad60f4..5fcfb3b 100644 --- a/Manuscript-Example/Examples/SimpleButtonExample/SimpleButtonExampleViewController.swift +++ b/Manuscript-Example/Examples/SimpleButtonExample/SimpleButtonExampleViewController.swift @@ -50,7 +50,7 @@ class SimpleButtonExampleViewController: UIViewController { init() { super.init(nibName: nil, bundle: nil) - self.title = "Buttons" + title = "Buttons" } required init(coder aDecoder: NSCoder) { @@ -62,56 +62,56 @@ class SimpleButtonExampleViewController: UIViewController { override func loadView() { super.loadView() - self.view.backgroundColor = UIColor.gray + view.backgroundColor = UIColor.gray - self.setupSubviews() - self.setupLayout() + setupSubviews() + setupLayout() } // MARK: - Target func buttonPressed(_ sender: UIButton) { - if sender == self.activeButton { + if sender == activeButton { return; } - if let activeButton = self.activeButton { + if let activeButton = activeButton { switch activeButton { - case self.optionA: - self.optionAHeight?.constant = self.buttonDimSmall - self.optionAWidth?.constant = self.buttonDimSmall - self.optionA.setNeedsLayout() - case self.optionB: - self.optionBHeight?.constant = self.buttonDimSmall - self.optionBWidth?.constant = self.buttonDimSmall - self.optionB.setNeedsLayout() - case self.optionC: - self.optionCHeight?.constant = self.buttonDimSmall - self.optionCWidth?.constant = self.buttonDimSmall - self.optionC.setNeedsLayout() + case optionA: + optionAHeight?.constant = buttonDimSmall + optionAWidth?.constant = buttonDimSmall + optionA.setNeedsLayout() + case optionB: + optionBHeight?.constant = buttonDimSmall + optionBWidth?.constant = buttonDimSmall + optionB.setNeedsLayout() + case optionC: + optionCHeight?.constant = buttonDimSmall + optionCWidth?.constant = buttonDimSmall + optionC.setNeedsLayout() default: print("active button is unknown") } } switch sender { - case self.optionA: - self.optionAHeight?.constant = self.buttonDimBig - self.optionAWidth?.constant = self.buttonDimBig - self.optionA.setNeedsLayout() - case self.optionB: - self.optionBHeight?.constant = self.buttonDimBig - self.optionBWidth?.constant = self.buttonDimBig - self.optionB.setNeedsLayout() - case self.optionC: - self.optionCHeight?.constant = self.buttonDimBig - self.optionCWidth?.constant = self.buttonDimBig - self.optionC.setNeedsLayout() + case optionA: + optionAHeight?.constant = buttonDimBig + optionAWidth?.constant = buttonDimBig + optionA.setNeedsLayout() + case optionB: + optionBHeight?.constant = buttonDimBig + optionBWidth?.constant = buttonDimBig + optionB.setNeedsLayout() + case optionC: + optionCHeight?.constant = buttonDimBig + optionCWidth?.constant = buttonDimBig + optionC.setNeedsLayout() default: print("sender button is unknown") } - self.activeButton = sender + activeButton = sender UIView.animate(withDuration: 0.25, animations: { self.view.layoutIfNeeded() @@ -121,41 +121,41 @@ class SimpleButtonExampleViewController: UIViewController { // MARK: - Setup & Layout fileprivate func setupSubviews() { - self.optionA.backgroundColor = UIColor.white - self.optionA.setTitle("A", for: UIControlState()) - self.optionA.addTarget(self, action: #selector(SimpleButtonExampleViewController.buttonPressed(_:)), for: .touchUpInside) - self.view.addSubview(self.optionA) - - self.optionB.backgroundColor = UIColor.white - self.optionB.setTitle("B", for: UIControlState()) - self.optionB.addTarget(self, action: #selector(SimpleButtonExampleViewController.buttonPressed(_:)), for: .touchUpInside) - self.view.addSubview(self.optionB) - - self.optionC.backgroundColor = UIColor.white - self.optionC.setTitle("C", for: UIControlState()) - self.optionC.addTarget(self, action: #selector(SimpleButtonExampleViewController.buttonPressed(_:)), for: .touchUpInside) - self.view.addSubview(self.optionC) + optionA.backgroundColor = UIColor.white + optionA.setTitle("A", for: UIControlState()) + optionA.addTarget(self, action: #selector(SimpleButtonExampleViewController.buttonPressed(_:)), for: .touchUpInside) + view.addSubview(optionA) + + optionB.backgroundColor = UIColor.white + optionB.setTitle("B", for: UIControlState()) + optionB.addTarget(self, action: #selector(SimpleButtonExampleViewController.buttonPressed(_:)), for: .touchUpInside) + view.addSubview(optionB) + + optionC.backgroundColor = UIColor.white + optionC.setTitle("C", for: UIControlState()) + optionC.addTarget(self, action: #selector(SimpleButtonExampleViewController.buttonPressed(_:)), for: .touchUpInside) + view.addSubview(optionC) } fileprivate func setupLayout() { - Manuscript.layout(self.optionA) { c in - self.optionAHeight = c.set(.height, to:self.buttonDimSmall).constraint - self.optionAWidth = c.set(.width, to:self.buttonDimSmall).constraint - c.make(.right, equalTo:self.optionB, s:.left, minus: 10.0) - c.make(.centerY, equalTo:self.view, s:.centerY) + Manuscript.layout(optionA) { c in + optionAHeight = c.set(.height, to:buttonDimSmall).constraint + optionAWidth = c.set(.width, to:buttonDimSmall).constraint + c.make(.right, equalTo:optionB, s:.left, minus: 10.0) + c.make(.centerY, equalTo:view, s:.centerY) } - Manuscript.layout(self.optionB) { c in - self.optionBHeight = c.set(.height, to:self.buttonDimSmall).constraint - self.optionBWidth = c.set(.width, to:self.buttonDimSmall).constraint - c.centerIn(self.view) + Manuscript.layout(optionB) { c in + optionBHeight = c.set(.height, to:buttonDimSmall).constraint + optionBWidth = c.set(.width, to:buttonDimSmall).constraint + c.centerIn(view) } - Manuscript.layout(self.optionC) { c in - self.optionCHeight = c.set(.height, to:self.buttonDimSmall).constraint - self.optionCWidth = c.set(.width, to:self.buttonDimSmall).constraint - c.make(.left, equalTo:self.optionB, s:.right, plus: 10.0) - c.make(.centerY, equalTo:self.view, s:.centerY) + Manuscript.layout(optionC) { c in + optionCHeight = c.set(.height, to:buttonDimSmall).constraint + optionCWidth = c.set(.width, to:buttonDimSmall).constraint + c.make(.left, equalTo:optionB, s:.right, plus: 10.0) + c.make(.centerY, equalTo:view, s:.centerY) } } diff --git a/README.md b/README.md index 470d416..c20064e 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,8 @@ Center a UIView 'childView' in self.view and make it 30 by 30 in size ```swift Manuscript.layout(childView) { c in - c.make(.CenterX, equalTo: self.view, s: .CenterX) - c.make(.CenterY, equalTo: self.view, s: .CenterY) + c.make(.CenterX, equalTo: view, s: .CenterX) + c.make(.CenterY, equalTo: view, s: .CenterY) c.set(.Width, to: 30.0) c.set(.Height, to: 30.0) } @@ -64,7 +64,7 @@ The same, but using the convenience methods ```swift Manuscript.layout(childView) { c in - c.centerIn(self.view) + c.centerIn(view) c.setSize(CGSize(width: 30.0, height: 30.0)) } ``` @@ -75,10 +75,10 @@ Align a UIView 'container' to all edges of self.view ```swift Manuscript.layout(container) { c in - c.make(.Left, equalTo: self.view, s: .Left) - c.make(.Right, equalTo: self.view, s: .Right) - c.make(.Top, equalTo: self.view, s: .Top) - c.make(.Bottom, equalTo: self.view, s: .Bottom) + c.make(.Left, equalTo: view, s: .Left) + c.make(.Right, equalTo: view, s: .Right) + c.make(.Top, equalTo: view, s: .Top) + c.make(.Bottom, equalTo: view, s: .Bottom) } ``` @@ -86,7 +86,7 @@ The same, but using the convenience methods ```swift Manuscript.layout(container) { c in - c.alignAllEdges(to: self.view) + c.alignAllEdges(to: view) } ``` @@ -97,10 +97,10 @@ container. ```swift Manuscript.layout(container) { c in - c.make(.Left, equalTo: self.view, s: .Left, plus: 30.0) - c.make(.Right, equalTo: self.view, s: .Right, minus: 30.0) - c.make(.Top, equalTo: self.view, s: .Top, plus: 30.0) - c.make(.Bottom, equalTo: self.view, s: .Bottom, minus: 30.0) + c.make(.Left, equalTo: view, s: .Left, plus: 30.0) + c.make(.Right, equalTo: view, s: .Right, minus: 30.0) + c.make(.Top, equalTo: view, s: .Top, plus: 30.0) + c.make(.Bottom, equalTo: view, s: .Bottom, minus: 30.0) } ``` @@ -108,7 +108,7 @@ The same, but using convenience methods. ```swift Manuscript.layout(container) { c in - c.alignAllEdges(to: self.view, withInsets: UIEdgeInsets(top: 30.0, left: 30.0, bottom: 30.0, right: 30.0)) + c.alignAllEdges(to: view, withInsets: UIEdgeInsets(top: 30.0, left: 30.0, bottom: 30.0, right: 30.0)) } ``` @@ -118,10 +118,10 @@ Make use of the LayoutGuides provided by UIViewController. ```swift Manuscript.layout(container) { c in - c.make(.Left, equalTo: self.view, s: .Left) - c.make(.Right, equalTo: self.view, s: .Right) - c.make(.Top, equalTo: self.topLayoutGuide, s: .Baseline) - c.make(.Bottom, equalTo: self.bottomLayoutGuide, s: .Baseline) + c.make(.Left, equalTo: view, s: .Left) + c.make(.Right, equalTo: view, s: .Right) + c.make(.Top, equalTo: topLayoutGuide, s: .Baseline) + c.make(.Bottom, equalTo: bottomLayoutGuide, s: .Baseline) } ``` @@ -131,9 +131,9 @@ There is a utility method to create hairlines which takes the screen scale into ```swift Manuscript.layout(mySeparatorLine) { c in - c.make(.Left, equalTo: self.view, s: .Left) - c.make(.Right, equalTo: self.view, s: .Right) - c.make(.Top, equalTo: self.topLayoutGuide, s: .Baseline) + c.make(.Left, equalTo: view, s: .Left) + c.make(.Right, equalTo: view, s: .Right) + c.make(.Top, equalTo: topLayoutGuide, s: .Baseline) // sets the .Height to 1.0 on non-retina displays and to 0.5 on retina displays c.makeHorizontalHairline() @@ -149,10 +149,10 @@ is the nearest common superview of the `UIView`s involved. ```swift Manuscript.layout(container) { c in - self.leftConstaint = c.make(.Left, equalTo: self.view, s: .Left).constraint - self.rightConstaint = c.make(.Right, equalTo: self.view, s: .Right).constraint - self.topConstaint = c.make(.Top, equalTo: self.topLayoutGuide, s: .Baseline).constraint - self.bottomConstaint = c.make(.Bottom, equalTo: self.bottomLayoutGuide, s: .Baseline).constraint + leftConstaint = c.make(.Left, equalTo: view, s: .Left).constraint + rightConstaint = c.make(.Right, equalTo: view, s: .Right).constraint + topConstaint = c.make(.Top, equalTo: topLayoutGuide, s: .Baseline).constraint + bottomConstaint = c.make(.Bottom, equalTo: bottomLayoutGuide, s: .Baseline).constraint } ``` @@ -160,8 +160,8 @@ Afterwards, just modify the constraint's constant and apply the changes (this is ```swift UIView.animateWithDuration(0.6) { in - self.topConstraint?.constant = 100 - self.view.layoutIfNeeded() + topConstraint?.constant = 100 + view.layoutIfNeeded() } ``` @@ -183,9 +183,9 @@ To integrate Manuscript into your Xcode project using Carthage, specify it in yo ```ogdl github "floriankrueger/Manuscript" ``` - + If you need to support Swift 2.3 then please use the last compatible version 2.1.0 - + ```ogdl github "floriankrueger/Manuscript" == 2.1.0 ``` From 096ee8957a9fbc2c77b338a672b1f9d4fa882526 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Kr=C3=BCger?= Date: Thu, 20 Oct 2016 14:45:29 +0200 Subject: [PATCH 9/9] [MTC] fixes the version in podspec, updates Changelog and README --- CHANGELOG.md | 4 ++++ Manuscript.podspec | 2 +- README.md | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29aec8b..b846c84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Version 3.0.0 + +- [x] Swift 3 compatibility + ## Version 2.0.0 - [x] New Repository structure diff --git a/Manuscript.podspec b/Manuscript.podspec index 3882a09..c2a70ad 100644 --- a/Manuscript.podspec +++ b/Manuscript.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Manuscript" - s.version = "2.1.0" + s.version = "3.0.0" s.summary = "AutoLayoutKit in pure Swift." s.description = <<-DESC It's like AutoLayoutKit but written in Swift. For pure Swift projects. And it's super simple. diff --git a/README.md b/README.md index c20064e..4fc7d09 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ [![Coveralls branch](https://img.shields.io/coveralls/floriankrueger/manuscript.svg)](https://coveralls.io/r/floriankrueger/Manuscript) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![CocoaPods](https://img.shields.io/cocoapods/v/Manuscript.svg)](https://github.com/floriankrueger/Manuscript) +[![Swift](https://img.shields.io/badge/Swift-3.0-orange.svg)](https://swift.org) [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/floriankrueger/Manuscript/master/LICENSE) ![Manuscript: Dead-Simple AutoLayout](https://raw.githubusercontent.com/floriankrueger/Manuscript/assets/manuscript.png)