1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
silica-viewer/ProcreateViewer/ViewController.swift

20 lines
666 B
Swift
Raw Normal View History

2020-03-10 14:23:54 -04:00
import Foundation
import Cocoa
class ViewController: NSViewController {
@IBOutlet weak var imageView: NSImageView!
2020-03-11 22:15:05 -04:00
2020-03-10 14:23:54 -04:00
override func viewWillAppear() {
let document = self.view.window?.windowController?.document as? Document
2020-03-11 23:31:42 -04:00
imageView.image = document?.makeComposite()
}
override func prepare(for segue: NSStoryboardSegue, sender: Any?) {
if(segue.identifier == "showInfo") {
// TODO: there HAS to be a better way to pass the Document class along...
(segue.destinationController as! InfoViewController).document = self.view.window?.windowController?.document as? Document
}
2020-03-10 14:23:54 -04:00
}
}