Releases: acrocat/EverLayout
0.9.0 No more Socket.IO
0.8.3 Refactoring and Unit Tests
Nothing super interesting, just making the project more stable.
0.7.0 UINavigationBar properties and constraint targeting
- If the view environment is a
UIViewController
, which is a child of aUINavigationController
, the layout file can now map some properties to theUINavigationBar
, such asbackgroundColor
,textColor
,controllerTitle
,translucent
andtintColor
. - Different size classes can now be specified for constraints in the shorthand syntax (for instance,
+120 hr vc
specifies a constant of 120 when the horizontal size class is regular and the vertical size class is compact.) - We can now modify layout constraints in code. You can find the constraints you're looking for by asking a View for the constraints affecting particular attributes, or by the constraint's identifier.
Documentation to come... soon
0.6.0 Size Classes and unloading
EverLayout now 'unoads' itself before updating. This means that any properties and constraints that are applied can be reversed when removed from the layout.
Unloading also makes way for constraints being applied and removed under different view traits.
"constraints":{
"center":{
"to":"super",
"verticalSizeClass":"regular"
},
"top left":{
"to":"super",
"verticalSizeClass":"compact"
},
"width height": [
{
"constant":"100",
"verticalSizeClass":"compact"
},
{
"constant":"200",
"verticalSizeClass":"regular"
}
]
}
Call a constraint update in the ViewController to make use of this
override func willTransition(to newCollection: UITraitCollection, with coordinator: UIViewControllerTransitionCoordinator) {
super.willTransition(to: newCollection, with: coordinator)
self.layout?.update(withTraitColelction: newCollection)
}
Docs coming soon.
0.5.1 'hidden' and 'placeholder' properties
EverLayout now resolves the properties hidden
for all UIViews, and placeholder
for UITextField
0.5.0 Templates
Out with sub-layouts, in with templates! Views can now load layout templates to prevent repetition of layout data. This is essentially a more flexible implementation of what was sub-layouts.
{
"name":"DemoLayout",
"root":{
"views":{
"!first":{
"template":"block",
"properties":{
"backgroundColor":"red"
},
"constraints":{
"center":"@super"
}
},
"!second":{
"template":"block",
"properties":{
"backgroundColor":"blue"
},
"constraints":{
"top":"@first",
"left":"@first.right"
}
}
}
},
"templates":{
"block":{
"constraints":{
"width height":"+130"
}
}
}
}
Templates can currently contain constraints and properties.
0.4.0 Comprehensive JSON layout constraints
Previously layout constraints have been expected in a 'short-hand' format like:
{
"width":"@super +12"
}
Now these constraints can be written in a more comprehensive way which may be easier to read, like so:
{
"width":{
"to":"super",
"constant":12
}
}
Updates to documentation are coming soon.
0.3.0 Images from URL
New
- Images can now be set with a URL
- Constraints can now be set with arrays to allow multiple rules to be applied to attributes
Pending documentation updates to explain these features.
0.2.0 - No more SwiftyJSON
Wrote a basic JSON parser to remove the need for SwiftyJSON as a Cocoapod dependency.
0.1.1 Hotfix - Descendent views
Constraints are now applied to the root view of the layout to avoid crashes when subview trees reference each other