Expand description
Construct and manage a graphical, event-driven user interface for your macOS app.
Structs§
- Action
- The action handler
- Action
Handler - A handler that contains the class for callback storage and invocation on
- NSApplication
- An object that manages an app’s main event loop and resources used by all of that app’s objects.
- NSButton
- A control that defines an area on the screen that a user clicks to trigger an action.
- NSColor
- An object that stores color data and sometimes opacity (alpha value).
- NSColor
Space - An object that represents a custom color space.
- NSControl
- A specialized view, such as a button or text field, that notifies your app of relevant events using the target-action design pattern.
- NSDock
Tile - The visual representation of your app’s miniaturized windows and app icon as they appear in the Dock.
- NSImage
- A high-level interface for manipulating image data.
- NSLayout
Anchor - A factory class for creating layout constraint objects using a fluent API.
- NSLayout
Constraint - The relationship between two user interface objects that must be satisfied by the constraint-based layout system.
- NSLayoutX
Axis Anchor - A factory class for creating horizontal layout constraint objects using a fluent API.
- NSLayoutY
Axis Anchor - A factory class for creating vertical layout constraint objects using a fluent API.
- NSMenu
- An object that manages an app’s menus.
- NSMenu
Item - A command item in an app menu.
- NSNib
- An object that manages an app’s menus.
- NSPasteboard
- An object that transfers data to and from the pasteboard server.
- NSPasteboard
Item - NSPopover
- A means to display additional content related to existing content on the screen.
- NSResponder
- An abstract class that forms the basis of event and command processing in AppKit.
- NSRunning
Application - An object that can manipulate and provide information for a single instance of an app.
- NSScreen
- An object that describes the attributes of a computer’s monitor or screen.
- NSStatus
Bar - An individual element displayed in the system menu bar.
- NSStatus
BarButton - The appearance and behavior of an item in the systemwide menu bar.
- NSStatus
Item - An individual element displayed in the system menu bar.
- NSStoryboard
- An encapsulation of the design-time view controller and window controller graph represented in an Interface Builder storyboard resource file.
- NSText
Field - Text the user can select or edit to send an action message to a target when the user presses the Return key.
- NSToolbar
- An object that manages the space above your app’s custom content and either below or integrated with the window’s title bar.
- NSView
- The infrastructure for drawing, printing, and handling events in an app.
- NSView
Controller - A controller that manages a view, typically loaded from a nib file.
- NSView
Controller Transition Options - NSWindow
- A
Window
represents your way of interacting with anNSWindow
. It wraps the various moving pieces to enable you to focus on reacting to lifecycle methods and doing your thing. - Window
Config - A config for a window.
Enums§
- NSApplication
Activation Options - The following flags are for
activateWithOptions
- NSApplication
Activation Policy - Activation policies (used by
activationPolicy
) that control whether and how an app may be activated. - NSApplication
Delegate Reply - Constants that indicate whether a copy or print operation was successful, was canceled, or failed.
- NSApplication
Terminate Reply - Constants that determine whether an app should terminate.
- NSBacking
Store Type - Constants that specify how the window device buffers the drawing done in a window.
- NSDisplay
Gamut - NSEvent
Mask - Constants that you use to filter out specific event types from the stream of incoming events.
- NSEvent
Type - Constants for the types of events that responder objects can handle.
- NSPasteboard
Contents Options - Options for preparing the pasteboard.
- NSPasteboard
Reading Options - Options that specify how to interpret data on the pasteboard when initializing pasteboard data.
- NSPopover
Behavior - The appearance and disappearance behavior of a popover.
- NSStatus
Item Behavior - A set of optional status item behaviors.
- NSTitlebar
Separator Style - Styles that determine the type of separator displayed between the title bar and content of a window.
- NSUser
Interface Layout Direction - Specifies the directional flow of the user interface.
- NSWindow
Button - Constants that provide a way to access standard title bar buttons.
- NSWindow
Collection Behavior - Window collection behaviors related to Exposé and Spaces.
- NSWindow
Depth - A type that represents the depth, or amount of memory, for a single pixel in a window or screen.
- NSWindow
Number List Options - Options to use when retrieving window numbers from the system.
- NSWindow
Occlusion State - Specifies whether the window is occluded.
- NSWindow
Ordering Mode - Constants that let you specify how a window is ordered relative to another window.
- NSWindow
Sharing Type - Constants that represent the access levels other processes can have to a window’s content.
- NSWindow
Style Mask - Constants that specify the style of a window, and that you can combine with the C bitwise OR operator.
- NSWindow
Title Visibility - Specifies the appearance of the window’s title bar area.
- NSWindow
Toolbar Style - Styles that determine the appearance and location of the toolbar in relation to the title bar.
Statics§
- ACTION_
CALLBACK_ PTR - The pointer for
ActionHandler
- NSAPPLICATION_
PTR - NSDevice
Bits ⚠PerSample - The corresponding value is an NSNumber object containing an integer that gives the bit depth of the window’s raster image (2-bit, 8-bit, and so forth).
- NSDevice
Color ⚠Space Name - The corresponding value is an NSString object giving the name of the window’s color space.
- NSDevice
IsPrinter ⚠ - If there is a corresponding value, this indicates that the display device is a printer.
- NSDevice
IsScreen ⚠ - If there is a corresponding value, this indicates that the display device is a screen.
- NSDevice
Resolution ⚠ - The corresponding value is an NSValue object containing a value of type NSSize that describes the window’s raster resolution in dots per inch (dpi).
- NSDevice
Size ⚠ - The corresponding value is an NSValue object containing a value of type NSSize that gives the size of the window’s frame rectangle.
- NSDock
Window ⚠Level Deprecated - The level for the dock.
- NSFile
Contents ⚠Pboard Type - A representation of a file’s contents.
- NSFind
Panel ⚠Case Insensitive Search - A Boolean value indicating whether the search is case-insensitive.
- NSFind
Panel ⚠Search Options Pboard Type - Type for the find panel metadata property list.
- NSFind
Panel ⚠Substring Match - A number object containing the match type to use in the find panel.
- NSFloating
Window ⚠Level - Useful for floating palettes.
- NSMain
Menu ⚠Window Level - Reserved for the application’s main menu.
- NSModal
Panel ⚠Window Level - The level for a modal panel.
- NSNS
Pasteboard ⚠Name General - The pasteboard you use to perform ordinary cut, copy, and paste operations.
- NSNib
Owner ⚠Deprecated - The external object that is responsible for the instantiated nib.
- NSNib
TopLevel ⚠Objects Deprecated - An NSMutableArray object that, if present, is populated with the top-level objects of the newly instantiated nib.
- NSNormal
Window ⚠Level - The default level for NSWindow objects.
- NSPasteboard
Name ⚠Drag - The pasteboard that stores data to move as the result of a drag operation.
- NSPasteboard
Name ⚠Find - The pasteboard that holds information about the current state of the active application’s find panel.
- NSPasteboard
Name ⚠Font - The pasteboard that holds font and character information and supports Copy Font and Paste Font commands that the text editor may implement.
- NSPasteboard
Name ⚠Ruler - The pasteboard that holds information about paragraph formats and supports the Copy Ruler and Paste Ruler commands that the text editor may implement.
- NSPasteboard
Type ⚠Color - Color data.
- NSPasteboard
Type ⚠FileURL - A file URL.
- NSPasteboard
Type ⚠Font - Font and character information.
- NSPasteboard
TypeHTML ⚠ - Type for HTML content.
- NSPasteboard
Type ⚠Multiple Text Selection - Multiple text selection.
- NSPasteboard
TypePDF ⚠ - PDF data.
- NSPasteboard
TypePNG ⚠ - PNG image data.
- NSPasteboard
TypeRTF ⚠ - Rich Text Format (RTF) data.
- NSPasteboard
TypeRTFD ⚠ - RTFD formatted file contents.
- NSPasteboard
Type ⚠Ruler - Paragraph formatting information.
- NSPasteboard
Type ⚠Sound - Sound data.
- NSPasteboard
Type ⚠String - String data.
- NSPasteboard
TypeTIFF ⚠ - Tag Image File Format (TIFF) data.
- NSPasteboard
Type ⚠Tabular Text - Tab-separated fields of text.
- NSPasteboard
Type ⚠Text Finder Options - Type for the Find panel metadata property list.
- NSPasteboard
TypeURL ⚠ - URL data for one file or resource.
- NSPasteboardURL
Reading ⚠Contents Conform ToTypes Key - Option for reading URLs to restrict the results to URLs with contents that conform to any of the provided UTI types.
- NSPop
UpMenu ⚠Window Level - The level for a pop-up menu.
- NSPopover
Close ⚠Reason Detach ToWindow - Specifies that the popover has been closed because it is being detached to a window.
- NSPopover
Close ⚠Reason Key - The userInfo key containing the reason for the
NSPopoverWillCloseNotification.
- NSPopover
Close ⚠Reason Standard - Specifies that the popover has been closed in a standard way.
- NSPopover
DidClose ⚠Notification - Sent after the popover has finished animating offscreen.
- NSPopover
DidShow ⚠Notification - Sent after the popover has finished animating onscreen.
- NSPopover
Will ⚠Close Notification - Sent before the popover is closed.
- NSPopover
Will ⚠Show Notification - NSPopoverWillShowNotification
- NSSTATUS_
BAR_ BUTTON_ HANDLER - This is an action handler for
NSStatusBarButton
- NSScreen
Color ⚠Space DidChange Notification - NSScreen
Saver ⚠Window Level - The level for a screen saver.
- NSStatus
Window ⚠Level - The level for a status window.
- NSSubmenu
Window ⚠Level - Reserved for submenus. Synonymous with NSTornOffMenuWindowLevel, which is preferred.
- NSText
Finder ⚠Case Insensitive Key - A Boolean value indicating whether the search is case insensitive.
- NSText
Finder ⚠Matching Type Key - A number object containing the match type to use.
- NSTorn
OffMenu ⚠Window Level - The level for a torn-off menu. Synonymous with NSSubmenuWindowLevel.
- staticNS
PasteboardURL ⚠Reading FileUR LsOnly Key
Traits§
- INSApplication
- An object that manages an app’s main event loop and resources used by all of that app’s objects.
- INSButton
- A trait containing all the methods for
NSButton
- INSControl
- A trait containing all the methods for
NSControl
- INSImage
- A trait containing all the methods for
NSImage
- INSLayout
Anchor - A trait containing all the methods for
NSLayoutAnchor
- INSLayout
Constraint - A trait containing all the methods for
NSLayoutConstraint
- INSLayoutX
Axis Anchor - A trait containing all the methods for
NSLayoutXAxisAnchor
- INSLayoutY
Axis Anchor - A trait containing all the methods for
NSLayoutYAxisAnchor
- INSMenu
- A trait containing all the methods for
NSMenu
- INSMenu
Item - A trait containing all the methods for
NSMenuItem
- INSNib
- A trait containing all the methods for
NSNib
- INSPasteboard
- A trait containing all the methods for
NSPasteboard
- INSPasteboard
Item - A trait containing all the methods for
NSPasteboardItem
- INSPopover
- A trait containing all the methods for
NSPopover
- INSResponder
- A trait containing all the methods for
NSResponder
- INSRunning
Application - A trait containing all the methods for
NSRunningApplication
- INSScreen
- A trait containing all the methods for
NSScreen
- INSStatus
Bar - A trait containing all the methods for
NSStatusBar
- INSStatus
BarButton - A trait containing all the methods for
NSStatusBarButton
- INSStatus
Item - A trait containing all the methods for
NSStatusItem
- INSStoryboard
- An encapsulation of the design-time view controller and window controller graph represented in an Interface Builder storyboard resource file.
- INSText
Field - A trait containing all the methods for
NSTextField
- INSView
- A trait containing all the methods for
NSView
- INSView
Controller - A trait containing all the methods for
NSViewController
- INSWindow
- A window that an app displays on the screen.
- PNSApplication
Delegate - A set of methods that manage your app’s life cycle and its interaction with common system services.
Functions§
- NSApplication
Main ⚠ - Called by the main function to create and run the application.
- NSBits
PerPixel ⚠From Depth - Returns the bits per pixel for the specified window depth.
- NSBits
PerSample ⚠From Depth - Returns the bits per sample for the specified window depth.
- NSColor
Space ⚠From Depth - Returns the name of the color space corresponding to the passed window depth.
- NSNumber
OfColor ⚠Components - Returns the number of color components in the specified color space.
- NSPlanar
From ⚠Depth - Returns whether the specified window depth is planar.
- register_
app_ delegate_ class - Registers an
NSObject
application delegate, and configures it for the various callbacks and pointers we need to have.
Type Aliases§
- NSColor
Space Name - Constants that specify color space names.
- NSDevice
Description Key - These constants are the keys for device description dictionaries.
- NSImage
Name - Named images, defined by the system or you, for use in your app.
- NSModal
Response - A set of button return values for modal dialogs.
- NSNib
Name - NSPasteboard
Name - Constants that represent the standard pasteboard names.
- NSPasteboard
Reading Option Key - Options for reading pasteboard data.
- NSPasteboard
Type - NSPasteboard
Type Find Panel Search Option Key - Search options for the find panel.
- NSPasteboard
Type Text Finder Option Key - Search options for text in Finder.
- NSPopover
Close Reason Value - Values that specify the reason for the
NSPopoverWillCloseNotification
notification. - NSStoryboard
Name - The name of the storyboard file.
- NSWindow
Frame Autosave Name - The type of a window’s frame autosave name.
- NSWindow
Level - The standard window levels in macOS.
- NSWindow
Persistable Frame Descriptor - The type of a window’s frame descriptor.