Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Commit

Permalink
Call self.init in CGRect.init(centre: size:) extension
Browse files Browse the repository at this point in the history
  • Loading branch information
wojciechczerski committed Sep 23, 2018
1 parent 87c16c4 commit 8500ccf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SwiftMonkeyPaws/MonkeyPaws.swift
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ extension UIApplication {

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

0 comments on commit 8500ccf

Please sign in to comment.