Skip to content

Conversation

@lucdion
Copy link
Member

@lucdion lucdion commented Jun 2, 2017

It is now possible to user ‘%’ characters.
ex:
view.pin.top().left(25%).width(25%).height(100%)

  • width(_ percent: Percent)
  • height(_ percent: Percent)
  • size(_ percent: Percent)
  • top(_ percent: Percent)
  • left(_ percent: Percent)
  • bottom(_ percent: Percent)
  • right(_ percent: Percent)
  • hCenter(_ percent: Percent)
  • vCenter(_ percent: Percent)

Plus:

  • size(_ sideLength: CGFloat)
  • Implement hCenter() & vCenter()
  • Implement margin(_ vertical: CGFloat, _ horizontal: CGFloat) & margin(_ top: CGFloat, _ horizontal: CGFloat, _ bottom: CGFloat)
  • Add more unit tests
  • Removed few forced optionals
  • Removed deprecated UIView+PinLayout extension.

It is now possible to user ‘%’ characters.
ex:
	view.pin.top().left(25%).width(25%).height(100%)

* top(_ percent: Percent)
* left(_ percent: Percent)
* bottom(_ percent: Percent)
* right(_ percent: Percent)
* hCenter(_ percent: Percent)
* vCenter(_ percent: Percent)

Plus:
* Implement hCenter() & vCenter()
* Implement margin(_ vertical: CGFloat, _ horizontal: CGFloat) & margin(_ top: CGFloat, _ horizontal: CGFloat, _ bottom: CGFloat)
* Add more unit tests
* Removed few forced optionals
* Removed deprecated UIView+PinLayout extension.
@hugolefrancois
Copy link

Nice les % !

@codecov-io
Copy link

codecov-io commented Jun 2, 2017

Codecov Report

Merging #27 into master will increase coverage by 0.38%.
The diff coverage is 80.97%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #27      +/-   ##
==========================================
+ Coverage   93.54%   93.93%   +0.38%     
==========================================
  Files          15       14       -1     
  Lines        2417     2605     +188     
==========================================
+ Hits         2261     2447     +186     
- Misses        156      158       +2
Impacted Files Coverage Δ
PinLayout/Helpers/Coordinates.swift 100% <ø> (+14.63%) ⬆️
PinLayout/TypesImpl.swift 100% <100%> (ø) ⬆️
PinLayoutTests/AdjustSizeSpec.swift 100% <100%> (ø) ⬆️
PinLayoutTests/PinEdgesSpec.swift 100% <100%> (ø) ⬆️
PinLayout/PinLayout.swift 100% <100%> (ø) ⬆️
PinLayout/PinLayoutImpl.swift 81.27% <53.84%> (-2.96%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b2255e4...2680397. Read the comment docs.

@lucdion
Copy link
Member Author

lucdion commented Jun 2, 2017

@hugomirego oui je trouve aussi 😄

@lucdion lucdion merged commit 47aa208 into master Jun 2, 2017
@lucdion lucdion deleted the percentages branch June 2, 2017 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants