Because nothing holds more truth than pure code 🤓 Xibs and storyboards are heavy, hard to maintain, hard to merge. They split the view concept into 2 separate files making debugging a nightmare There must be a better way
How
By creating a tool that makes Auto layout code finally readable by a human being. By coupling it with live code injection such as injectionForXcode we can design views in real time View layout becomes fun, concise, maintainable and dare I say, beautiful ❤️
Login View Example
In the project folder, you can find an example of a typical login view laid out in both native and Stevia for you to understand and compare the two approaches.
As a spoiler alert, the number of characters goes from 2380 to 1239 ( ~ divided by 2)
Write Half the code that is actually 10X more expressive and maintainable !
🔴 Live Reload
Live reload enables you to develop your views live without relaunching the app everytime.
Select Xcode>File> Swift Packages>Add Package Dependency... and add https://github.com/freshOS/Stevia.
The Swift Package Manager (SPM) is now the official way to install stevia. The other package managers are now deprecated as of 4.8.0 and won’t be supported in future versions. For Carthage/Cocoapods support (legacy versions) see documentation here.
📖 Documentation
The following will teach you the gist of Stevia in one minute. To go further, you can refer to the full documentation here.
Stevia enables you to write readable Auto Layout code. It does so by tackling the 3 main components of layout: view hierarchy, layout and styling.
Winner of Hacking with Swift Recommended award
You + Stevia = 🦄
Reason - Example - Live Reload - Installation - Documentation
🖼 Visual Layout Api
⛓ Chainable Api
📐 Equation-Based Api
All Generate native NSLayoutConstraints 🎉
👨🔬Try it!
Stevia is part of freshOS iOS toolset. Try it in an example App ! Download Starter Project
💡 Reason
Because nothing holds more truth than pure code 🤓
Xibs and storyboards are heavy, hard to maintain, hard to merge.
They split the view concept into 2 separate files making debugging a nightmare
There must be a better way
How
By creating a tool that makes Auto layout code finally readable by a human being.
By coupling it with live code injection such as injectionForXcode we can design views in real time
View layout becomes fun, concise, maintainable and dare I say, beautiful ❤️
Login View Example
In the project folder, you can find an example of a typical login view laid out in both native and Stevia for you to understand and compare the two approaches.
As a spoiler alert, the number of characters goes from 2380 to 1239 ( ~ divided by 2)
Write Half the code that is actually 10X more expressive and maintainable !
🔴 Live Reload
Live reload enables you to develop your views live without relaunching the app everytime.
Stevia + InjectionForXcode = #WhoNeedsReactNative?? 🚀
Just
Cmd+S
and you can dev live in the simulator !Learn more about how to set up live reload here.
⚙️ Installation
Stevia
is installed via the official Swift Package Manager.Select
Xcode
>File
>Swift Packages
>Add Package Dependency...
and add
https://github.com/freshOS/Stevia
.The Swift Package Manager (SPM) is now the official way to install
stevia
. The other package managers are now deprecated as of4.8.0
and won’t be supported in future versions.For Carthage/Cocoapods support (legacy versions) see documentation here.
📖 Documentation
The following will teach you the gist of Stevia in one minute.
To go further, you can refer to the full documentation here.
Stevia enables you to write readable Auto Layout code. It does so by tackling the 3 main components of layout: view hierarchy, layout and styling.
01 - View hierarchy
becomes
02 - Layout
becomes
03 - Styling
becomes
👨💻 Contributors
YannickDot, S4cha, Damien, Snowcraft, Mathieu-o, Blaz Merela, Theophane Rupin, Jason Liang, liberty4me, Scott Bates, Sai, Mike Gallagher, WaterNotWords, Mick MacCallum, Onur Genes
👥 Backers
Like the project? Offer coffee or support us with a monthly donation and help us continue our activities :)
📲 Apps using Stevia
Many top-notch Apps with millions of users use Stevia to write better Auto Layout code:
You are using Stevia ? Please let me know @sachadso@gmail.com and I’ll add you to the list 😍!
🏅 Sponsors
Become a sponsor and get your logo on our README on Github with a link to your site :)
Swift Version