Skip to content

Instantly share code, notes, and snippets.

@asukakenji
Created November 29, 2018 11:31
Show Gist options
  • Select an option

  • Save asukakenji/b89ce54d771843100ce19d76c89b3a68 to your computer and use it in GitHub Desktop.

Select an option

Save asukakenji/b89ce54d771843100ce19d76c89b3a68 to your computer and use it in GitHub Desktop.

Revisions

  1. asukakenji created this gist Nov 29, 2018.
    16 changes: 16 additions & 0 deletions main.swift
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    import AppKit

    let app = NSApplication.shared
    app.setActivationPolicy(.regular)

    let window = NSWindow(
    contentRect: NSMakeRect(0, 0, 640, 480),
    styleMask: [.titled, .closable],
    backing: .buffered,
    defer: true
    )
    window.title = "Hello, world!"
    window.makeKeyAndOrderFront(nil)

    app.activate(ignoringOtherApps: true)
    app.run()