Search code examples
swiftcore-graphicscgrect

CGGeometry Extension - Override CGRectMake


I'm trying to extend the CGGeometry class (or is it a struct?). I've tried importing UIKit, CoreGraphics, CoreGraphics.CGGeometry, and even Foundation but I keep getting "Use of undeclared type CGGeometry".

This is my actual extension, just trying to override CGRectMake() for starters. Is it even possible to override CGGeometry?

extension CGGeometry {
    override func CGRectMake() {

    }
}

Solution

  • CGGeometry is not a class actually neither a struct, the file is called CGGeometry where the defenitions of geometric primitives are defined, so you cannot override it.