mirror of
https://github.com/Luigi30/FruitMachine-Swift.git
synced 2024-11-23 17:33:47 +00:00
34 lines
665 B
Swift
34 lines
665 B
Swift
//
|
|
// AppleScreenView.swift
|
|
// FruitMachine
|
|
//
|
|
// Created by Christopher Rohl on 7/27/17.
|
|
// Copyright © 2017 Christopher Rohl. All rights reserved.
|
|
//
|
|
|
|
import Cocoa
|
|
|
|
class AppleScreenView: NSView {
|
|
|
|
override var acceptsFirstResponder: Bool {
|
|
return true
|
|
}
|
|
|
|
override func becomeFirstResponder() -> Bool {
|
|
return true
|
|
}
|
|
|
|
override func resignFirstResponder() -> Bool {
|
|
return true
|
|
}
|
|
|
|
override func draw(_ dirtyRect: NSRect) {
|
|
super.draw(dirtyRect)
|
|
// Drawing code here.
|
|
|
|
layer?.sublayers![0].setNeedsDisplay()
|
|
layer?.sublayers![0].display()
|
|
}
|
|
|
|
}
|