CGRect
public extension CGRect
extension CGRect: ScopeFunctions
-
Returns a new rect that is the result of centering the receiver in
rect.Declaration
Swift
func center(inRect rect: CGRect) -> CGRectParameters
rectThe rect to center the receiver in
Return Value
The centered rect
-
Returns a new rect that is the result of centering the receiver horizontally in
rect.Declaration
Swift
func centerHorizontally(inRect rect: CGRect) -> CGRectParameters
rectThe rect to horizontally center the receiver in
Return Value
The horizontally centered rect
-
Returns a new rect that is the result of centering the receiver vertically in
rect.Declaration
Swift
func centerVertically(inRect rect: CGRect) -> CGRectParameters
rectThe rect to vertically center the receiver in
Return Value
The vertically centered rect
View on GitHub
Install in Dash
CGRect Extension Reference