:leaves: Concise Autolayout code
Thanks @cowgp for this release.
-Adds Int
and CGFloat
variants for SteviaLayoutAnchor operators. (Fixes https://github.com/freshOS/Stevia/issues/153)
Congrats @edulpn for this release 👏
Updates to swift-tools-version:5.3
Thanks @moliya for noticing CGFloat
values were broken in layout
blocks, this is now fixed 🎉
⚠️ A serious bug has been found in this release, please use 5.0.1 instead ⚠️
Bug found that can break your layouts -> https://github.com/freshOS/Stevia/pull/141
CGFloat
for all apis%
constraints can now be used in layout
blocks for margins, height & spacessv()
is renamed to subviews()
for claritysubviews()
has now its function builder counterpart: subviews{}
(no more commas!)layout()
has now its function builder counterpart: layout {}
fillVertically(m:)
is renamed to fillVertically(padding:)
fillHorizontally(m:)
is renamed to fillHorizontally(padding:)
fillContainer(x)
is renamed to fillContainer(padding: x)
centerHorizontally(x)
is renamed to centerHorizontally(offset: x)
--
operator is renamed in hyphen bullet for better compile times. (auto replace)arrangedSubviews {}
function builderSwift Package Manager is now the official way to install Stevia 🎉. In order to use other package managers, see previous versions. Onwards ! ✨
>=
& <=
with single values. Props @jsonfellin for noticing, thanks @excursus for chiming in 🙏Before
view.Width >= 30 ≠ view.width(>=30)
view.Width >= 30 was equivalent to view.Width >= Width + 30 (Wrong)
view.Botton >= 100 was equivalent to view.Bottom >= Bottom + 100 (Wrong)
view.Right >= 100 was equivalent to view.Right >= Right + 100 (Wrong)
Now
view.Width >= 30 == view.width(>=30)
view.Height <= 100 == view.height(<=100)
view.Botton >= 100 == view.Bottom >= Bottom - 100
view.Right >= 100 == view.Right >= Right - 100