The Write.as desktop (GUI) app for macOS.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

35 lignes
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. }