The Write.as desktop (GUI) app for macOS.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

35 wiersze
821 B

  1. //
  2. // AppDelegate.swift
  3. // writeas
  4. //
  5. // Created by Matt Baer on 12/29/15.
  6. // Copyright © 2015 A Bunch Tell. All rights reserved.
  7. //
  8. import Cocoa
  9. @NSApplicationMain
  10. class AppDelegate: NSObject, NSApplicationDelegate {
  11. var vc: ViewController?
  12. func applicationDidFinishLaunching(aNotification: NSNotification) {
  13. // Insert code here to initialize your application
  14. }
  15. func applicationWillTerminate(_ aNotification: Notification) {
  16. // Insert code here to tear down your application
  17. }
  18. func applicationDidBecomeActive(_ notification: Notification) {
  19. if vc == nil {
  20. vc = NSApplication.shared().mainWindow?.contentViewController as! ViewController
  21. }
  22. }
  23. @IBAction func saveDocument(_ sender: AnyObject) {
  24. vc?.saveDocument()
  25. }
  26. }