Neon is built around how user interfaces are naturally and intuitively designed. No more springs and struts. No more whacky visual format language. No more auto layout constraints. We're not robots, so why should we build our UIs like we are? Build dynamic and beautiful user interfaces like a boss, with Swift. You can use Cocoapods to install Neon by adding it to your Podfile. To get the full benefits import Neon wherever you have a UIView operation. Rather than design some arbitrary layout for a demonstration, I figured a good test for the practicality of Neon would be to replicate an existing screen from a major app, one that everyone could recognize. Now, keep in mind you'll probably want constants defined for many of these size/padding values, in order to keep the code cleaner and easier to maintain, but I decided to use real numbers for most of the values to make the code less obscure when new people are reading through the demonstration.
Features
- There are a few ways you can anchor views using Neon
- Sometimes you want a view to fill its superview entirely, which couldn't be easier
- Optionally, if you want a view to fill its superview with padding, you can provide padding instead
- Make your UI more complex by aligning other views relative to other sibling views
- Grouping views relative to a sibling view can be done as well
- You can also specify that you want a group of subviews to fill their superview, either horizontally or vertically