Skip to content

Commit

Permalink
Fixed minor issues with naming (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrommcarrasco authored Oct 2, 2018
1 parent b75bca2 commit aff77bd
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Constrictor.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.swift_version = "4.2"
s.name = "Constrictor"
s.version = "4.0.0"
s.version = "4.0.1"
s.summary = "🐍 AutoLayout's µFramework"

s.description = "(Boe) Constrictor's AutoLayout µFramework with the goal of simplying your constraints by reducing the amount of code you have to write."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public extension Constrictable {

@discardableResult
func constrictSize(as relation: NSLayoutConstraint.Relation = .equal,
with constant: Constant,
to constant: Constant,
prioritizeAs priority: UILayoutPriority = .required) -> Self {


Expand All @@ -77,11 +77,11 @@ public extension Constrictable {

@discardableResult
func constrictSize(as relation: NSLayoutConstraint.Relation = .equal,
with constant: CGFloat,
to constant: CGFloat,
prioritizeAs priority: UILayoutPriority = .required) -> Self {


constrictSize(as: relation, with: Constant(size: constant), prioritizeAs: priority)
constrictSize(as: relation, to: Constant(size: constant), prioritizeAs: priority)

return self
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ extension UIViewConstrictorSizeTests {
// Setup
viewController.view.addSubview(aView)
viewController.view.addSubview(bView)
bView.constrictSize(with: .height(Constants.constant) & .width(Constants.constant * 2))
bView.constrictSize(to: .height(Constants.constant) & .width(Constants.constant * 2))

// Tests
let widthConstraints = bView.findConstraints(for: .width, at: .secondItem)
Expand All @@ -109,7 +109,7 @@ extension UIViewConstrictorSizeTests {
// Setup
viewController.view.addSubview(aView)
viewController.view.addSubview(bView)
bView.constrictSize(with: Constants.constant)
bView.constrictSize(to: Constants.constant)

// Tests
let widthConstraints = bView.findConstraints(for: .width, at: .secondItem)
Expand Down
3 changes: 1 addition & 2 deletions Example/Example/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ class ViewController: UIViewController {
redView.addSubview(blueView)

// Constraints -> 75 width, 75 height and centered in viewcontroller's view

blueView.constrict(attributes: .width, .height, with: .all(75))
blueView.constrictSize(to: 75.0)
.constrictCenter(in: self)

// ** Green View **
Expand Down
4 changes: 2 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PODS:
- Constrictor (3.0.1)
- Constrictor (4.0.1)

DEPENDENCIES:
- Constrictor (from `..`)
Expand All @@ -9,7 +9,7 @@ EXTERNAL SOURCES:
:path: ".."

SPEC CHECKSUMS:
Constrictor: 9cc4316728fcd05fa09b7cf19ad03ed042472a0c
Constrictor: 467026945defda6be01655737d8927160c97775b

PODFILE CHECKSUM: 378ecc6ae0c8cd6d7e4d84896a541255c3c32287

Expand Down

0 comments on commit aff77bd

Please sign in to comment.