mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
10 lines
267 B
Swift
10 lines
267 B
Swift
|
|
extension CGRect {
|
|
|
|
init(center: CGPoint, size: CGSize) {
|
|
let originX = center.x - size.width / 2
|
|
let originY = center.y - size.height / 2
|
|
let origin = CGPoint(x: originX, y: originY)
|
|
self.init(origin: origin, size: size)
|
|
}
|
|
}
|