Class

NSObject

NSObject is the root class of most Objective-C class hierarchies. Through NSObject, objects inherit a basic interface to the runtime system and the ability to behave as Objective-C objects.

Overview

Previously, NSObject was part of the Foundation framework.

Symbols

Initializing a Class

class func initialize()

Initializes the class before it receives its first message.

class func load()

Invoked whenever a class or category is added to the Objective-C runtime; implement this method to perform class-specific behavior upon loading.

Creating, Copying, and Deallocating Objects

init()

Implemented by subclasses to initialize a new object (the receiver) immediately after memory for it has been allocated.

func copy()

Returns the object returned by copy(with:).

func mutableCopy()

Returns the object returned by mutableCopy(with:) where the zone is nil.

Identifying Classes

class func superclass()

Returns the class object for the receiver’s superclass.

class func isSubclass(of: AnyClass)

Returns a Boolean value that indicates whether the receiving class is a subclass of, or identical to, a given class.

Testing Class Functionality

class func instancesRespond(to: Selector!)

Returns a Boolean value that indicates whether instances of the receiver are capable of responding to a given selector.

Testing Protocol Conformance

class func conforms(to: Protocol)

Returns a Boolean value that indicates whether the receiver conforms to a given protocol.

Obtaining Information About Methods

func method(for: Selector!)

Locates and returns the address of the receiver’s implementation of a method so it can be called as a function.

class func instanceMethod(for: Selector!)

Locates and returns the address of the implementation of the instance method identified by a given selector.

Describing Objects

class func description()

Returns a string that represents the contents of the receiving class.

Discardable Content Proxy Support

var autoContentAccessingProxy: Any

A proxy for the receiving object

Sending Messages

func perform(Selector, with: Any?, afterDelay: TimeInterval)

Invokes a method of the receiver on the current thread using the default mode after a delay.

func perform(Selector, with: Any?, afterDelay: TimeInterval, inModes: [RunLoopMode])

Invokes a method of the receiver on the current thread using the specified modes after a delay.

func performSelector(onMainThread: Selector, with: Any?, waitUntilDone: Bool)

Invokes a method of the receiver on the main thread using the default mode.

func performSelector(onMainThread: Selector, with: Any?, waitUntilDone: Bool, modes: [String]?)

Invokes a method of the receiver on the main thread using the specified modes.

func perform(Selector, on: Thread, with: Any?, waitUntilDone: Bool)

Invokes a method of the receiver on the specified thread using the default mode.

func perform(Selector, on: Thread, with: Any?, waitUntilDone: Bool, modes: [String]?)

Invokes a method of the receiver on the specified thread using the specified modes.

func performSelector(inBackground: Selector, with: Any?)

Invokes a method of the receiver on a new background thread.

class func cancelPreviousPerformRequests(withTarget: Any)

Cancels perform requests previously registered with the perform(_:with:afterDelay:) instance method.

Forwarding Messages

func forwardingTarget(for: Selector!)

Returns the object to which unrecognized messages should first be directed.

Dynamically Resolving Methods

class func resolveClassMethod(Selector!)

Dynamically provides an implementation for a given selector for a class method.

class func resolveInstanceMethod(Selector!)

Dynamically provides an implementation for a given selector for an instance method.

Error Handling

func doesNotRecognizeSelector(Selector!)

Handles messages the receiver doesn’t recognize.

Archiving

func awakeAfter(using: NSCoder)

Overridden by subclasses to substitute another object in place of the object that was decoded and subsequently received this message.

var classForArchiver: AnyClass?

The class to substitute for the receiver's own class during archiving.

var classForCoder: AnyClass

Overridden by subclasses to substitute a class other than its own during coding.

var classForKeyedArchiver: AnyClass?

Subclasses to substitute a new class for instances during keyed archiving.

class func classFallbacksForKeyedArchiver()

Overridden to return the names of classes that can be used to decode objects if their class is unavailable.

class func classForKeyedUnarchiver()

Overridden by subclasses to substitute a new class during keyed unarchiving.

func replacementObject(for: NSArchiver)

Overridden by subclasses to substitute another object for itself during archiving.

func replacementObject(for: NSCoder)

Overridden by subclasses to substitute another object for itself during encoding.

func replacementObject(for: NSKeyedArchiver)

Overridden by subclasses to substitute another object for itself during keyed archiving.

class func setVersion(Int)

Sets the receiver's version number.

class func version()

Returns the version number assigned to the class.

Working with Class Descriptions

var attributeKeys: [String]

An array of NSString objects containing the names of immutable values that instances of the receiver's class contain.

var classDescription: NSClassDescription

An object containing information about the attributes and relationships of the receiver’s class.

func inverse(forRelationshipKey: String)

For a given key that defines the name of the relationship from the receiver’s class to another class, returns the name of the relationship from the other class to the receiver’s class.

var toManyRelationshipKeys: [String]

An array containing the keys for the to-many relationship properties of the receiver.

var toOneRelationshipKeys: [String]

The keys for the to-one relationship properties of the receiver, if any.

Scripting

var classCode: FourCharCode

The receiver's Apple event type code, as stored in the NSScriptClassDescription object for the object’s class.

var className: String

A string containing the name of the class.

func copyScriptingValue(Any, forKey: String, withProperties: [String : Any])

Creates and returns one or more scripting objects to be inserted into the specified relationship by copying the passed-in value and setting the properties in the copied object or objects.

func newScriptingObject(of: AnyClass, forValueForKey: String, withContentsValue: Any?, properties: [String : Any])

Creates and returns an instance of a scriptable class, setting its contents and properties, for insertion into the relationship identified by the key.

var scriptingProperties: [String : Any]?

An NSString-keyed dictionary of the receiver's scriptable properties.

func scriptingValue(for: NSScriptObjectSpecifier)

Given an object specifier, returns the specified object or objects in the receiving container.

Deprecated Methods

func finalize()

The garbage collector invokes this method on the receiver before disposing of the memory it uses.

Deprecated

Instance Properties

var hashValue: Int
var observationInfo: UnsafeMutableRawPointer?

Returns a pointer that identifies information about all of the observers that are registered with the observed object.

var accessibilityFocusedUIElement: Any?

The deepest descendant of the accessibility hierarchy that has the focus.

var accessibilityNotifiesWhenDestroyed: Bool

A Boolean value that indicates whether a custom accessibility object sends a notification when its corresponding UI element is destroyed.

var exposedBindings: [String]

Returns an array containing the bindings exposed by the receiver.

var objectForWebScript: Any!

Returns an object that exposes the plug-in’s scripting interface.

var objectSpecifier: NSScriptObjectSpecifier?

Returns an object specifier for the receiver.

var webFrame: WebFrame!

Returns the WebFrame that contains the plug-in.

var webPlugInContainerSelectionColor: NSColor!

Returns the plug-in selection color.

var accessibilityActivationPoint: CGPoint

The activation point for the accessibility element, in screen coordinates.

var accessibilityCustomActions: [UIAccessibilityCustomAction]?

An array of custom actions to display along with the built-in actions.

var accessibilityCustomRotors: [UIAccessibilityCustomRotor]?
var accessibilityElements: [Any]?

An array of the accessibility elements in the container.

var accessibilityElementsHidden: Bool

A Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden.

var accessibilityFrame: CGRect

The frame of the accessibility element, in screen coordinates.

var accessibilityHeaderElements: [Any]?
var accessibilityHint: String?

A brief description of the result of performing an action on the accessibility element, in a localized string.

var accessibilityLabel: String?

A succinct label that identifies the accessibility element, in a localized string.

var accessibilityLanguage: String?

The language in which to speak the accessibility element's label, value, and hint.

var accessibilityNavigationStyle: UIAccessibilityNavigationStyle

The navigation style to apply to the object and its elements.

var accessibilityPath: UIBezierPath?

The path of the element, in screen coordinates.

var accessibilityTraits: UIAccessibilityTraits

The combination of accessibility traits that best characterize the accessibility element.

var accessibilityValue: String?

The value of the accessibility element, in a localized string.

var accessibilityViewIsModal: Bool

A Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver.

var isAccessibilityElement: Bool

A Boolean value indicating whether the receiver is an accessibility element that an assistive application can access.

var shouldGroupAccessibilityChildren: Bool

A Boolean value indicating whether VoiceOver should group together the elements that are children of the receiver, regardless of their positions on the screen.

class var accessInstanceVariablesDirectly: Boolvar isSelectable: Bool

Instance Methods

func addObserver(NSObject, forKeyPath: String, options: NSKeyValueObservingOptions = [], context: UnsafeMutableRawPointer?)

Registers the observer object to receive KVO notifications for the key path relative to the object receiving this message.

func attemptRecovery(fromError: Error, optionIndex: Int)

Implemented to attempt a recovery from an error noted in an application-modal dialog.

func dictionaryWithValues(forKeys: [String])

Returns a dictionary containing the property values identified by each of the keys in a given array.

func didChange(NSKeyValueChange, valuesAt: IndexSet, forKey: String)

Informs the observed object that the specified change has occurred on the indexes for a specified ordered to-many relationship.

func didChangeValue(forKey: String)

Informs the observed object that the value of a given property has changed.

func didChangeValue(forKey: String, withSetMutation: NSKeyValueSetMutationKind, using: Set<AnyHashable>)

Informs the observed object that the specified change was made to a specified unordered to-many relationship.

func fileManager(FileManager, shouldProceedAfterError: [AnyHashable : Any])

An NSFileManager object sends this message to its handler for each error it encounters when copying, moving, removing, or linking files or directories.

Deprecated
func fileManager(FileManager, willProcessPath: String)

An NSFileManager object sends this message to a handler immediately before attempting to move, copy, rename, or delete, or before attempting to link to a given path.

Deprecated
func mutableArrayValue(forKey: String)

Returns a mutable array proxy that provides read-write access to an ordered to-many relationship specified by a given key.

func mutableArrayValue(forKeyPath: String)

Returns a mutable array that provides read-write access to the ordered to-many relationship specified by a given key path.

func mutableOrderedSetValue(forKey: String)

Returns a mutable ordered set that provides read-write access to the uniquing ordered to-many relationship specified by a given key.

func mutableOrderedSetValue(forKeyPath: String)

Returns a mutable ordered set that provides read-write access to the uniquing ordered to-many relationship specified by a given key path.

func mutableSetValue(forKey: String)

Returns a mutable set proxy that provides read-write access to the unordered to-many relationship specified by a given key.

func mutableSetValue(forKeyPath: String)

Returns a mutable set that provides read-write access to the unordered to-many relationship specified by a given key path.

func observeValue(forKeyPath: String?, of: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?)

Informs the observing object when the value at the specified key path relative to the observed object has changed.

func removeObserver(NSObject, forKeyPath: String)

Stops the observer object from receiving change notifications for the property specified by the key path relative to the object receiving this message.

func removeObserver(NSObject, forKeyPath: String, context: UnsafeMutableRawPointer?)

Stops the observer object from receiving change notifications for the property specified by the key path relative to the object receiving this message, given the context.

func setNilValueForKey(String)

Invoked by setValue(_:forKey:) when it’s given a nil value for a scalar value (such as an int or float).

func setValue(Any?, forKey: String)

Sets the property of the receiver specified by a given key to a given value.

func setValue(Any?, forKeyPath: String)

Sets the value for the property identified by a given key path to a given value.

func setValue(Any?, forUndefinedKey: String)

Invoked by setValue(_:forKey:) when it finds no property for a given key.

func setValuesForKeys([String : Any])

Sets properties of the receiver with values from a given dictionary, using its keys to identify the properties.

func validateValue(AutoreleasingUnsafeMutablePointer<AnyObject?>, forKey: String)

Returns a Boolean value that indicates whether the value specified by a given pointer is valid for the property identified by a given key.

func validateValue(AutoreleasingUnsafeMutablePointer<AnyObject?>, forKeyPath: String)

Returns a Boolean value that indicates whether the value specified by a given pointer is valid for a given key path relative to the receiver.

func value(forKey: String)

Returns the value for the property identified by a given key.

func value(forKeyPath: String)

Returns the value for the derived property identified by a given key path.

func value(forUndefinedKey: String)

Invoked by value(forKey:) when it finds no property corresponding to a given key.

func willChange(NSKeyValueChange, valuesAt: IndexSet, forKey: String)

Informs the observed object that the specified change is about to be executed at given indexes for a specified ordered to-many relationship.

func willChangeValue(forKey: String)

Informs the observed object that the value of a given property is about to change.

func willChangeValue(forKey: String, withSetMutation: NSKeyValueSetMutationKind, using: Set<AnyHashable>)

Informs the observed object that the specified change is about to be made to a specified unordered to-many relationship.

func acceptsPreviewPanelControl(QLPreviewPanel!)
func accessibilityActionDescription(String)

Returns a localized description of the specified action.

Deprecated
func accessibilityActionNames()

Returns an array of action names supported by the accessibility element.

Deprecated
func accessibilityArrayAttributeCount(String)

Returns the count of the specified accessibility array attribute.

func accessibilityArrayAttributeValues(String, index: Int, maxCount: Int)

Returns a subarray of values of an accessibility array attribute.

func accessibilityAttributeNames()

Returns an array of attribute names supported by the receiver.

Deprecated
func accessibilityAttributeValue(String)

Returns the value of the specified attribute in the receiver.

Deprecated
func accessibilityAttributeValue(String, forParameter: Any?)

Returns the value of the receiver's parameterized attribute corresponding to the specified attribute name and parameter.

Deprecated
func accessibilityHitTest(NSPoint)

Returns the deepest descendant of the accessibility hierarchy that contains the specified point.

func accessibilityIndex(ofChild: Any)

Returns the index of the specified accessibility child in the parent.

func accessibilityIsAttributeSettable(String)

Returns a Boolean value that indicates whether the value for the specified attribute in the receiver can be set.

Deprecated
func accessibilityIsIgnored()

Returns a Boolean value indicating whether the receiver should be ignored in the parent-child accessibility hierarchy.

Deprecated
func accessibilityParameterizedAttributeNames()

Returns a list of parameterized attribute names supported by the receiver.

Deprecated
func accessibilityPerformAction(String)

Performs the action associated with the specified action.

Deprecated
func accessibilitySetOverrideValue(Any?, forAttribute: String)

Overrides the specified attribute in the receiver or adds it if it does not exist, and sets its value to the specified value.

Deprecated
func accessibilitySetValue(Any?, forAttribute: String)

Sets the value of the specified attribute in the receiver to the specified value.

Deprecated
func actionProperty()

Sent to the delegate to request the property the action applies to.

func application(NSApplication, delegateHandlesKey: String)

Sent by Cocoa’s built-in scripting support during execution of get or set script commands to find out if the delegate can handle operations on the specified key-value key.

func authorizationViewCreatedAuthorization(SFAuthorizationView!)

Sent to the delegate to indicate the authorization object has been created or changed. If you have saved a copy of the authorization object for your own purposes, you should discard it and call authorization for a new authorization object.

func authorizationViewDidAuthorize(SFAuthorizationView!)

Sent to the delegate to indicate the user was authorized and the authorization view was changed to unlocked.

func authorizationViewDidDeauthorize(SFAuthorizationView!)

Sent to the delegate to indicate the user was deauthorized and the authorization view was changed to locked.

func authorizationViewDidHide(SFAuthorizationView!)

Sent to the delegate to indicate that the view’s visibility has changed.

func authorizationViewReleasedAuthorization(SFAuthorizationView!)

Sent to the delegate to indicate that deauthorization is about to occur.

func authorizationViewShouldDeauthorize(SFAuthorizationView!)

Sent to the delegate when a user clicks the open lock icon.

func awakeFromNib()

Prepares the receiver for service after it has been loaded from an Interface Builder archive, or nib file.

func beginPreviewPanelControl(QLPreviewPanel!)
func bind(String, to: Any, withKeyPath: String, options: [String : Any]? = nil)

Establishes a binding between a given property of the receiver and the property of a given object specified by a given key path.

func candidates(Any!)

Returns an array of candidates.

func certificatePanelShowHelp(SFCertificatePanel!)

Implements custom help behavior for the modal panel.

func changeColor(Any?)

Sent to the first responder when the user selects a color in an NSColorPanel object.

func changeFont(Any?)

Informs responders of a font change.

func chooseIdentityPanelShowHelp(SFChooseIdentityPanel!)

Implements custom help behavior for the modal panel.

func coerceValue(Any?, forKey: String)

Uses type info from the class description and NSScriptCoercionHandler to attempt to convert value for key to the proper type, if necessary.

func commitComposition(Any!)

Informs the controller that the composition should be committed.

func commitEditing()

Returns whether the receiver was able to commit any pending edits.

func commitEditingAndReturnError()

Attempt to commit pending edits, returning an error in the case of failure.

func composedString(Any!)

Return the current composed string.

func compositionParameterView(QCCompositionParameterView!, didChangeParameterWithKey: String!)

Called after an input parameter in the composition parameter view has been edited.

func compositionParameterView(QCCompositionParameterView!, shouldDisplayParameterWithKey: String!, attributes: [AnyHashable : Any]! = [:])

Allows you to define which composition parameters are visible in the user interface when the composition parameter view refreshes.

func compositionPickerView(QCCompositionPickerView!, didSelect: QCComposition!)

Performs custom tasks when the selected composition in the composition picker view changes.

func compositionPickerViewDidStartAnimating(QCCompositionPickerView!)

Performs custom tasks when the composition picker view starts animating a composition.

func compositionPickerViewWillStopAnimating(QCCompositionPickerView!)

Performs custom tasks when the composition picker view stops animating a composition.

func controlTextDidBeginEditing(Notification)

Sent when a control with editable text begins an editing session.

func controlTextDidChange(Notification)

Sent when the text in the receiving control changes.

func controlTextDidEndEditing(Notification)

Sent when a control with editable text ends an editing session.

func didCommand(by: Selector!, client: Any!)

Processes a command generated by user action such as typing certain keys or pressing the mouse button.

func didMatchString(PDFSelection)

Called for every match found during a find operation.

func discardEditing()

Causes the receiver to discard any changes, restoring the previous values.

func documentDidBeginDocumentFind(Notification)

Called when the PDFDocumentDidBeginFindNotification notification is posted.

func documentDidBeginPageFind(Notification)

Called when the PDFDocumentDidBeginPageFindNotification notification is posted.

func documentDidEndDocumentFind(Notification)

Called when the PDFDocumentDidEndFindNotification notification is posted.

func documentDidEndPageFind(Notification)

Called when the PDFDocumentDidEndPageFindNotification notification is posted.

func documentDidFindMatch(Notification)

Called when the PDFDocumentDidFindMatchNotification notification is posted.

func documentDidUnlock(Notification)

Called when the PDFDocumentDidUnlockNotification notification is posted.

func doesContain(Any)

Returns a Boolean value that indicates whether the receiver contains a given object.

func endPreviewPanelControl(QLPreviewPanel!)
func exceptionHandler(NSExceptionHandler!, shouldHandle: NSException!, mask: Int)

Implemented by the delegate to evaluate whether the delegating NSExceptionHandler instance should handle a given exception.

func exceptionHandler(NSExceptionHandler!, shouldLogException: NSException!, mask: Int)

Implemented by the delegate to evaluate whether the delegating NSExceptionHandler instance should log a given exception.

func fileTransferServicesAbortComplete(OBEXFileTransferServices!, error: OBEXError)func fileTransferServicesConnectionComplete(OBEXFileTransferServices!, error: OBEXError)func fileTransferServicesCopyRemoteFileComplete(OBEXFileTransferServices!, error: OBEXError)func fileTransferServicesCopyRemoteFileProgress(OBEXFileTransferServices!, transferProgress: [AnyHashable : Any]!)func fileTransferServicesCreateFolderComplete(OBEXFileTransferServices!, error: OBEXError, folder: String!)func fileTransferServicesDisconnectionComplete(OBEXFileTransferServices!, error: OBEXError)func fileTransferServicesFilePreparationComplete(OBEXFileTransferServices!, error: OBEXError)func fileTransferServicesPathChangeComplete(OBEXFileTransferServices!, error: OBEXError, finalPath: String!)func fileTransferServicesRemoveItemComplete(OBEXFileTransferServices!, error: OBEXError, removedItem: String!)func fileTransferServicesRetrieveFolderListingComplete(OBEXFileTransferServices!, error: OBEXError, listing: [Any]!)func fileTransferServicesSendFileComplete(OBEXFileTransferServices!, error: OBEXError)func fileTransferServicesSendFileProgress(OBEXFileTransferServices!, transferProgress: [AnyHashable : Any]!)
func finalizeForWebScript()

Performs cleanup when the scripting environment is reset.

func fontManager(Any, willIncludeFont: String)

Requests permission from the Font panel delegate to display the given font name in the Font panel.

Deprecated
func handle(NSEvent!, client: Any!)

Handles key down and mouse events.

func imageBrowser(IKImageBrowserView!, backgroundWasRightClickedWith: NSEvent!)

Performs custom tasks when the user right-clicks the image browser view background.

func imageBrowser(IKImageBrowserView!, cellWasDoubleClickedAt: Int)

Performs custom tasks when the user double-clicks an item in the image browser view.

func imageBrowser(IKImageBrowserView!, cellWasRightClickedAt: Int, with: NSEvent!)

Performs custom tasks when the user right-clicks an item in the image browser view.

func imageBrowser(IKImageBrowserView!, groupAt: Int)

Returns the group at the specified index.

func imageBrowser(IKImageBrowserView!, itemAt: Int)

Returns an object for the item in an image browser view that corresponds to the specified index.

func imageBrowser(IKImageBrowserView!, moveItemsAt: IndexSet!, to: Int)

Signals that the specified items should be moved to the specified destination.

func imageBrowser(IKImageBrowserView!, removeItemsAt: IndexSet!)

Signals that a remove operation should be applied to the specified items.

func imageBrowserSelectionDidChange(IKImageBrowserView!)

Performs custom tasks when the selection changes.

func imageRepresentation()

Returns the image to display.

func imageRepresentationType()

Returns the representation type of the image to display.

func imageSubtitle()

Returns the display subtitle of the image.

func imageTitle()

Returns the display title of the image.

func imageUID()

Returns a unique string that identifies the data source item.

func imageVersion()

Returns the version of the item.

func indicesOfObjects(byEvaluatingObjectSpecifier: NSScriptObjectSpecifier)

Returns the indices of the specified container objects.

func infoForBinding(String)

Returns a dictionary describing the receiver’s binding.

func inputText(String!, client: Any!)

Handles key down events that do not map to an action method.

func inputText(String!, key: Int, modifiers: Int, client: Any!)

Receives Unicode, the key code that generated it, and any modifier flags.

func insertValue(Any, at: Int, inPropertyWithKey: String)

Inserts an object at the specified index in the collection specified by the passed key.

func insertValue(Any, inPropertyWithKey: String)

Inserts an object in the collection specified by the passed key.

func invokeDefaultMethod(withArguments: [Any]!)

Executes when a script attempts to invoke a method on an exposed object directly.

func invokeUndefinedMethod(fromWebScript: String!, withArguments: [Any]!)

Handles undefined method invocation from the scripting environment.

func isCaseInsensitiveLike(String)

Returns a Boolean value that indicates whether receiver is considered to be “like” a given string when the case of characters in the receiver is ignored.

func isEqual(to: Any?)

Returns a Boolean value that indicates whether the receiver is equal to another given object.

func isGreaterThan(Any?)

Returns a Boolean value that indicates whether the receiver is greater than another given object.

func isGreaterThanOrEqual(to: Any?)

Returns a Boolean value that indicates whether the receiver is greater than or equal to another given object.

func isLessThan(Any?)

Returns a Boolean value that indicates whether the receiver is less than another given object.

func isLessThanOrEqual(to: Any?)

Returns a Boolean value that indicates whether the receiver is less than or equal to another given object.

func isLike(String)

Returns a Boolean value that indicates whether the receiver is "like" another given object.

func isNotEqual(to: Any?)

Returns a Boolean value that indicates whether the receiver is not equal to another given object.

func layer(CALayer, shouldInheritContentsScale: CGFloat, from: NSWindow)

Invoked when a resolution changes occurs for the window that hosts the layer.

func namesOfPromisedFilesDropped(atDestination: URL)

Returns the names of the files that the receiver promises to create at a specified location.

Deprecated
func numberOfGroups(inImageBrowser: IKImageBrowserView!)

Returns the number of groups in an image browser view.

func numberOfItems(inImageBrowser: IKImageBrowserView!)

Returns the number of records managed by the data source object.

func objectDidBeginEditing(Any)

This message should be sent to the receiver when editor has uncommitted changes that can affect the receiver.

func objectDidEndEditing(Any)

This message should be sent to the receiver when editor has finished editing a property belonging to the receiver.

func optionDescriptionsForBinding(String)

Returns an array describing the options for the specified binding.

func originalString(Any!)

Return the a string that consists of the precomposed unicode characters.

func pasteboard(NSPasteboard, provideDataForType: String)

Implemented by an owner object to provide promised data.

func pasteboardChangedOwner(NSPasteboard)

Notifies a prior owner of the specified pasteboard (and owners of representations on the pasteboard) that the pasteboard has changed owners.

func performAction(for: ABPerson!, identifier: String!)

Sent to the delegate to perform the action.

func prepareForInterfaceBuilder()

Called when a designable object is created in Interface Builder.

func quartzFilterManager(QuartzFilterManager!, didAdd: QuartzFilter!)func quartzFilterManager(QuartzFilterManager!, didModifyFilter: QuartzFilter!)func quartzFilterManager(QuartzFilterManager!, didRemove: QuartzFilter!)func quartzFilterManager(QuartzFilterManager!, didSelect: QuartzFilter!)
func removeValue(at: Int, fromPropertyWithKey: String)

Removes the object at the specified index from the collection specified by the passed key.

func replaceValue(at: Int, inPropertyWithKey: String, withValue: Any)

Replaces the object at the specified index in the collection specified by the passed key.

func saveOptions(IKSaveOptions!, shouldShowUTType: String!)

Called to determine if the specified uniform type identifier should be shown in the save panel.

func scriptingBegins(with: Any)

Returns true if, in a scripting comparison, the compared object matches the beginning of object. A default implementation is provided for NSString and NSAttributedString.

func scriptingContains(Any)

Returns true if, in a scripting comparison, the compared object contains object. A default implementation is provided for NSString and NSAttributedString.

func scriptingEnds(with: Any)

Returns true if, in a scripting comparison, the compared object matches the end of object. A default implementation is provided for NSString and NSAttributedString.

func scriptingIsEqual(to: Any)

Returns true if, in a scripting comparison, the compared object is equal to object. A default implementation is provided for NSString and NSAttributedString.

func scriptingIsGreaterThan(Any)

Returns true if, in a scripting comparison, the compared object is greater than object. A default implementation is provided for NSString and NSAttributedString.

func scriptingIsGreaterThanOrEqual(to: Any)

Returns true if, in a scripting comparison, the compared object is greater than or equal to object. A default implementation is provided for NSString and NSAttributedString.

func scriptingIsLessThan(Any)

Returns true if, in a scripting comparison, the compared object is less than object. A default implementation is provided for NSString and NSAttributedString.

func scriptingIsLessThanOrEqual(to: Any)

Returns true if, in a scripting comparison, the compared object is less than or equal to object. A default implementation is provided for NSString and NSAttributedString.

func shouldEnableAction(for: ABPerson!, identifier: String!)

Sent to the delegate to determine whether the action should be enabled.

func title(for: ABPerson!, identifier: String!)

Sent to the delegate to request the title of the menu item for the action.

func unbind(String)

Removes a given binding between the receiver and a controller.

func validModesForFontPanel(NSFontPanel)

Returns the mode mask corresponding to the expected font panel mode.

func validateMenuItem(NSMenuItem)

Implemented to override the default action of enabling or disabling a specific menu item.

func validateToolbarItem(NSToolbarItem)

If this method is implemented and returns false, NSToolbar will disable theItem; returning true causes theItem to be enabled.

func value(at: Int, inPropertyWithKey: String)

Retrieves an indexed object from the collection specified by the passed key.

func valueClassForBinding(String)

Returns the class of the value that will be returned for the specified binding.

func value(withName: String, inPropertyWithKey: String)

Retrieves a named object from the collection specified by the passed key.

func value(withUniqueID: Any, inPropertyWithKey: String)

Retrieves an object by ID from the collection specified by the passed key.

func view(NSView, stringForToolTip: NSToolTipTag, point: NSPoint, userData: UnsafeMutableRawPointer?)

Returns the tool tip string to be displayed due to the cursor pausing at location point within the tool tip rectangle identified by tag in the view view.

func webPlugInContainerShowStatus(String!)

Tells the container to show a status message.

func webPlugInDestroy()

Prepares the plug-in for deallocation.

func webPlugInInitialize()

Initializes the plug-in.

func webPlugInMainResourceDidFailWithError(Error!)

Invoked when an error occurs loading the main resource.

func webPlugInMainResourceDidFinishLoading()

Invoked when the connection successfully finishes loading data.

func webPlugInMainResourceDidReceive(Data!)

Invoked when the connection loads data incrementally.

func webPlugInMainResourceDidReceive(URLResponse!)

Invoked when the connection receives sufficient data to construct the URL response for its request.

func webPlugInSetIsSelected(Bool)

Controls plug-in behavior based on its selection.

func webPlugInStart()

Tells the plug-in to start normal operation.

func webPlugInStop()

Tells the plug-in to stop normal operation.

func workflowController(AMWorkflowController, didError: Error)

Invoked when the receiver's workflow encounters an error.

func workflowController(AMWorkflowController, didRun: AMAction)

Invoked when an action in the receiver's workflow is finished running.

func workflowController(AMWorkflowController, willRun: AMAction)

Invoked when an action in the receiver's workflow is about to run.

func workflowControllerDidRun(AMWorkflowController)

Tells the delegate that the workflow controller object finished running.

func workflowControllerDidStop(AMWorkflowController)

Tells the delegate that the workflow controller object has stopped.

func workflowControllerWillRun(AMWorkflowController)

Tells the delegate that the workflow controller object is about to run.

func workflowControllerWillStop(AMWorkflowController)

Tells the delegate that the workflow controller object is about to stop.

func accessibilityActivate()

Tells the element to activate itself and report the success or failure of the operation.

func accessibilityAssistiveTechnologyFocusedIdentifiers()
func accessibilityDecrement()

Tells the accessibility element to decrement the value of its content.

func accessibilityElement(at: Int)

Returns the accessibility element at the specified index.

func accessibilityElementCount()

Returns the number of accessibility elements in the container.

func accessibilityElementDidBecomeFocused()

Sent after an assistive technology has set its virtual focus on the accessibility element.

func accessibilityElementDidLoseFocus()

Sent after an assistive technology has removed its virtual focus from an accessibility element.

func accessibilityElementIsFocused()

Returns a Boolean value indicating whether an assistive technology is focused on the accessibility element.

func accessibilityIncrement()

Tells the accessibility element to increment the value of its content.

func accessibilityPerformEscape()

Dismisses a modal view and returns the success or failure of the action.

func accessibilityPerformMagicTap()

Performs a salient action.

func accessibilityScroll(UIAccessibilityScrollDirection)

Scrolls screen content in an application-specific way and returns the success or failure of the action.

func index(ofAccessibilityElement: Any)

Returns the index of the specified accessibility element.

Type Methods

class func automaticallyNotifiesObservers(forKey: String)

Returns a Boolean value that indicates whether the observed object supports automatic key-value observation for the given key.

class func debugDescription()class func hash()
class func keyPathsForValuesAffectingValue(forKey: String)

Returns a set of key paths for properties whose values affect the value of the specified key.

class func defaultPlaceholder(forMarker: Any?, withBinding: String)

Returns an object that will be used as the placeholder for the binding, when a key value coding compliant property of an instance of the receiving class returns the value specified by marker, and no other placeholder has been specified.

class func exposeBinding(String)

Exposes the specified binding, advertising its availability.

class func isKeyExcluded(fromWebScript: UnsafePointer<Int8>!)

Returns whether a key should be hidden from the scripting environment.

class func isSelectorExcluded(fromWebScript: Selector!)

Returns whether a selector should be hidden from the scripting environment.

class func setDefaultPlaceholder(Any?, forMarker: Any?, withBinding: String)

Sets placeholder as the default placeholder for the binding, when a key value coding compliant property of an instance of the receiving class returns the value specified by marker, and no other placeholder has been specified.

class func webScriptName(forKey: UnsafePointer<Int8>!)

Returns the scripting environment name for an attribute specified by a key.

class func webScriptName(for: Selector!)

Returns the scripting environment name for a selector.