All rights reserved. */ public var NSBorderlessWindowMask: Int { get } public var NSTitledWindowMask: Int { get } public var NSClosableWindowMask: Int { get } public var NSMiniaturizableWindowMask: Int { get } public var NSResizableWindowMask: Int { get }
a nib file. • Loading and displaying the window • Closing the window when appropriate • Customizing the window’s title • Storing the window’s frame (size and location) in the defaults database • Cascading the window in relation to other document windows of the application
X 10.10 • View Controllers were not part of the responder chain. • View life cycle methods such as viewDidLoad(), viewWillAppear() • Cocoa did not provide any container view controllers • NSWindow’s contentViewController was not available • OS X 10.10 Yosemite Release Notes Cocoa Application Framework • Almost the same feature UIViewController for iOS • Storyboards • Container
windowID ) var items = [Dictionary<NSObject, AnyObject>]() for i in 0..<CFArrayGetCount(windowInfosRef) { let lineUnsafePointer:UnsafePointer<Void> = CFArrayGetValueAtIndex(windowInfosRef, i) let lineRef = unsafeBitCast(lineUnsafePointer, CFDictionaryRef.self) let dictionary = lineRef as Dictionary<NSObject, AnyObject> print((dictionary[kCGWindowLayer as String] as! NSNumber).integerValue) items.append(dictionary) }
self.windowListAboveWindowID(CGWindowID(0)) for i in 0..<items.count { if items[i].isNormalWindow() { let item = items[i] topWindow = item break } } TFMGMBZFS$(8JOEPX-FWFM'PS,FZ /PSNBM8JOEPX-FWFM,FZ