DEV Community

loading...

Test Post

griffin-stewie
・1 min read

Gif

extension CGRect {
    public init(center: CGPoint, size: CGSize) {
        origin = CGPoint(x: center.x-size.width/2, y: center.y-size.height/2)
        self.size = size
    }
}
Enter fullscreen mode Exit fullscreen mode

Discussion (0)