Commit b95456d7 by Daniel Dahan

issue-1172: added size to Layout toolset

parent a89797ae
...@@ -392,6 +392,16 @@ public extension Layout { ...@@ -392,6 +392,16 @@ public extension Layout {
} }
/** /**
The width and height of the view to its parent's.
- Parameter _ size: A CGSize offset.
- Returns: A Layout instance to allow chaining.
*/
@discardableResult
func size(_ size: CGSize) -> Layout {
return width(size.width).height(size.height)
}
/**
Constraints edges of the view to its parent's. Constraints edges of the view to its parent's.
- Parameter top: A CGFloat offset for top. - Parameter top: A CGFloat offset for top.
- Parameter left: A CGFloat offset for left. - Parameter left: A CGFloat offset for left.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment