My problem is that I am unable to draw an oval in a view controller using swift for an application being written for OSX.
I have the following code in a view controller:
class TouchController: NSViewController {
override func viewDidLoad() {
super.viewDidLoad()
//// Color Declarations
let color2 = NSColor(calibratedRed: 0.769, green: 0.364, blue: 0.364, alpha: 1)
//// Oval Drawing
let ovalPath = NSBezierPath(ovalInRect: NSMakeRect(70, 24, 145, 143))
color2.setFill()
ovalPath.fill()
}
}
The code for the drawings were created by paint code. I am writing this for OSX in Swift. My question is why, when I compile the code is the oval not displayed?