ios - How to combine CGRects with each other in Swift -


i wondering if there way combine cgrect cgrect new cgrect. swift have preset functionality or there way of achieving this?

let rect1 = cgrect(x: 0, y: 0, width: 100, height: 100) let rect2 = cgrect(x: 40, y: 40, width: 150, height: 150) cgrectunion(rect1, rect2) // {x 0 y 0 w 190 h 190} 

see more:


Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -