Skip to content

Releases: acrocat/EverLayout

0.9.0 No more Socket.IO

25 May 11:41
Compare
Choose a tag to compare

Due to constantly being plagued with Carthage/Cocoapod support issues I decided to finally remove EverLayout's dependence on Socket.IO.

The EverLayoutBridge now uses custom network code (be cautious).

0.8.3 Refactoring and Unit Tests

19 May 14:37
Compare
Choose a tag to compare

Nothing super interesting, just making the project more stable.

0.7.0 UINavigationBar properties and constraint targeting

02 May 14:47
Compare
Choose a tag to compare
  • If the view environment is a UIViewController, which is a child of a UINavigationController, the layout file can now map some properties to the UINavigationBar, such as backgroundColor, textColor, controllerTitle, translucent and tintColor.
  • 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

06 Apr 13:02
Compare
Choose a tag to compare

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

22 Mar 13:55
Compare
Choose a tag to compare

EverLayout now resolves the properties hidden for all UIViews, and placeholder for UITextField

0.5.0 Templates

20 Mar 16:39
Compare
Choose a tag to compare

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

16 Mar 12:30
Compare
Choose a tag to compare

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

24 Feb 16:37
Compare
Choose a tag to compare

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

22 Feb 17:45
Compare
Choose a tag to compare

Wrote a basic JSON parser to remove the need for SwiftyJSON as a Cocoapod dependency.

0.1.1 Hotfix - Descendent views

22 Feb 11:47
Compare
Choose a tag to compare

Constraints are now applied to the root view of the layout to avoid crashes when subview trees reference each other