Skip to content

Commit

Permalink
issue-1172: added size to Layout toolset
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Dahan committed Nov 3, 2018
1 parent a89797a commit b95456d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Sources/iOS/Layout.swift
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,16 @@ public extension Layout {
return constraint(.height, constant: offset)
}

/**
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.
- Parameter top: A CGFloat offset for top.
Expand Down

0 comments on commit b95456d

Please sign in to comment.