This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
class DeveloperToolsController { | |
let commandController: CommandController | |
init(commandController: CommandController) { | |
self.commandController = commandController | |
} | |
#if DEBUG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import Vaccine | |
class PlayerAttributesViewController: UIViewController { | |
let dataSource: UITableViewDataSource | |
var tableView: UITableView! | |
init(dataSource: UITableViewDataSource) { | |
self.dataSource = dataSource | |
super.init(nibName: nil, bundle: nil) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.height, height: UIScreen.main.bounds.width) | |
let window = UIWindow(frame: frame) | |
let transformRotation = CGAffineTransform(rotationAngle: CGFloat(-270) * .pi / 180) | |
window.transform = transformRotation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.height, height: UIScreen.main.bounds.width) | |
let window = UIWindow(frame: frame) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
import PlaygroundSupport | |
let frame = CGRect(origin: .zero, | |
size: .init(width: 150, height: 150)) | |
let window = NSView(frame: frame) | |
window.wantsLayer = true | |
window.layer?.backgroundColor = NSColor.white.cgColor | |
let view = NSView(frame: CGRect(origin: .init(x: 25, y: 25), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
let frame = CGRect(origin: .zero, | |
size: .init(width: 150, height: 150)) | |
let window = UIWindow(frame: frame) | |
let rootView = UIView(frame: window.bounds) | |
rootView.backgroundColor = .white | |
window.addSubview(rootView) | |
let view = UIView(frame: CGRect(origin: .init(x: 25, y: 25), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
import PlaygroundSupport | |
class View: NSView { | |
override var isFlipped: Bool { return true } | |
} | |
let subviewFrame = CGRect(origin: .zero, | |
size: CGSize(width: 320, height: 640 * 4)) | |
let gradient = CAGradientLayer() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
import PlaygroundSupport | |
let subviewFrame = CGRect(origin: .zero, | |
size: CGSize(width: 320, height: 640 * 4)) | |
let gradient = CAGradientLayer() | |
gradient.colors = [ | |
NSColor.blue.withAlphaComponent(0.2).cgColor, | |
NSColor.blue.withAlphaComponent(0.4).cgColor | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
class ContainerView: ColorView { | |
override var isFlipped: Bool { return true } | |
} | |
class ColorView: NSView { | |
required init(frame: CGRect, color: NSColor) { | |
super.init(frame: frame) | |
wantsLayer = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Cocoa | |
class ContainerView: ColorView { | |
override var isFlipped: Bool { return true } | |
} | |
class ColorView: NSView { | |
required init(frame: CGRect, color: NSColor) { | |
super.init(frame: frame) | |
wantsLayer = true |
NewerOlder