SCNNode
Extends:
Direct Subclass:
Implements:
A structural element of a scene graph, representing a position and transform in a 3D coordinate space, to which you can attach geometry, lights, cameras, or other displayable content.
Static Member Summary
Static Public Members | ||
public static get |
|
|
public static get |
|
|
public static get |
|
Static Method Summary
Static Public Methods | ||
public static |
Constructor for JSExport compatibility |
|
public static |
nodeWithGeometry(geometry: SCNGeometry): SCNNode Constructor for JSExport compatibility |
Constructor Summary
Public Constructor | ||
public |
constructor(geometry: SCNGeometry) Creates and returns a node object with the specified geometry attached. |
Member Summary
Public Members | ||
public get |
actionKeys: string[] Use this property to list actions you scheduled using the runAction(:forKey:) or runAction(:forKey:completionHandler:) method. |
|
public get |
This array contains all keys for which animations are attached to the object, or is empty if there are no attached animations. |
|
public get |
Positional audio effects from a player attached to a node are based on that node’s position relative to the audioListener position in the scene.After an audio player completes playback, SceneKit automatically removes it from the node. |
|
public set |
boundingBox: * |
|
public get |
boundingBox: {min: SCNVector3, max: SCNVector3} The minimum and maximum corner points of the object’s bounding box. |
|
public get |
boundingSphere: {center: SCNVector3, radius: number} Scene Kit defines a bounding sphere in the local coordinate space using a center point and a radius. |
|
public |
The camera attached to the node. |
|
public |
A Boolean value that determines whether SceneKit renders the node’s contents into shadow maps. |
|
public |
A mask that defines which categories the node belongs to. |
|
public get |
An array of the node’s children in the scene graph hierarchy. |
|
public |
A list of constraints affecting the node’s transformation. |
|
public get |
|
|
public |
|
|
public set |
eulerAngles: * |
|
public get |
The node’s orientation, expressed as pitch, yaw, and roll angles, each in radians. |
|
public |
filters: CIFilter[] An array of Core Image filters to be applied to the rendered contents of the node. |
|
public |
focusBehavior: SCNNodeFocusBehavior |
|
public get |
geometry: * |
|
public set |
geometry: * |
|
public get |
This value is true if the node has any executing actions; otherwise the value is false. |
|
public get |
|
|
public |
A Boolean value that determines the visibility of the node’s contents. |
|
public |
A Boolean value that determines whether to run actions and animations attached to the node and its child nodes. |
|
public |
The light attached to the node. |
|
public get |
|
|
public |
The morpher object responsible for blending the node’s geometry. |
|
public |
A value that indicates how SceneKit should handle the node when rendering movement-related effects. |
|
public |
A name associated with the node. |
|
public set |
opacity: * |
|
public get |
The opacity value of the node. |
|
public set |
orientation: * |
|
public get |
The node’s orientation, expressed as a quaternion. |
|
public get |
For a scene’s rootNode object, the value of this property is nil. |
|
public get |
An array of SCNParticleSystem objects directly attached to the node. |
|
public set |
physicsBody: * |
|
public get |
physicsBody: * |
|
public |
The physics field associated with the node. |
|
public |
The pivot point for the node’s position, rotation, and scale. |
|
public set |
position: * |
|
public get |
The translation applied to the node. |
|
public get |
When you use implicit animation (see SCNTransaction) to change a node’s properties, those node properties are set immediately to their target values, even though the animated node content appears to transition from the old property values to the new. |
|
public get |
|
|
public |
An object responsible for rendering custom contents for the node using Metal or OpenGL. |
|
public |
The order the node’s content is drawn in relative to that of other nodes. |
|
public set |
rotation: * |
|
public get |
rotation: * |
|
public set |
scale: * |
|
public get |
scale: * |
|
public get |
|
|
public |
The skinner object responsible for skeletal animations of node’s contents. |
|
public get |
The transformation applied to the node relative to its parent. |
|
public set |
transform: * |
|
public get |
|
|
public get |
|
|
public get |
|
|
public set |
|
|
public get |
|
|
public get |
|
|
public get |
A world transform is the node’s coordinate space transformation relative to the scene’s coordinate space. |
|
public get |
|
Method Summary
Public Methods | ||
public |
actionForKey(key: string): SCNAction Use this method to retrieve actions you scheduled using the runAction(:forKey:) or runAction(:forKey:completionHandler:) method. |
|
public |
addAnimationForKey(animation: CAAnimation, key: string): void Newly added animations begin executing after the current run loop cycle ends.SceneKit does not define any requirements for the contents of the key parameter—it need only be unique among the keys for other animations you add. |
|
public |
addAnimationPlayerForKey(player: SCNAnimationPlayer, key: string): void |
|
public |
addAudioPlayer(player: SCNAudioPlayer): void Positional audio effects from a player attached to a node are based on that node’s position relative to the audioListener position in the scene.After playback has completed, SceneKit automatically removes the audio player from the node. |
|
public |
addChildNode(child: SCNNode): void Calling this method appends the node to the end of the childNodes array. |
|
public |
addParticleSystem(system: SCNParticleSystem): void When attached to a node, a particle system’s emitter location follows that node as it moves through the scene. |
|
public |
animationForKey(key: string): CAAnimation Attempting to modify any properties of the returned object results in undefined behavior. |
|
public |
|
|
public |
childNodeWithName(name: string): SCNNode SceneKit searches only those nodes in the node’s childNodes array. |
|
public |
childNodeWithNameRecursively(name: string, recursively: boolean): SCNNode If the recursive parameter is true, SceneKit uses a preorder traversal to search the child node subtree—that is, the block searches a node before it searches each of the node’s children, and it searches all children of a node before searching any of that node’s sibling nodes. |
|
public |
childNodesPassingTest(predicate: function(child: SCNNode, stop: UnsafeMutablePointer<ObjCBool>): boolean): SCNNode[] Use this method to search for nodes using a test you specify. |
|
public |
This method recursively copies the node and its child nodes. |
|
public |
convertPositionFrom(position: SCNVector3, node: SCNNode): SCNVector3 Converts a position to the node’s coordinate space from that defined by another node. |
|
public |
convertPositionTo(position: SCNVector3, node: SCNNode): SCNVector3 Converts a position from the node’s coordinate space to that defined by another node. |
|
public |
convertTransformFrom(transform: SCNMatrix4, node: SCNNode): SCNMatrix4 Converts a transformation to the node’s coordinate space from that defined by another node. |
|
public |
convertTransformTo(transform: SCNMatrix4, node: SCNNode): SCNMatrix4 Converts a transformation from the node’s coordinate space to that defined by another node. |
|
public |
convertVectorFrom(vector: SCNVector3, node: SCNNode): SCNVector3 |
|
public |
convertVectorTo(vector: SCNVector3, node: SCNNode): SCNVector3 |
|
public |
|
|
public |
destory() |
|
public |
enumerateChildNodes(block: function(child: SCNNode, stop: UnsafeMutablePointer<ObjCBool>): void): void SceneKit uses a recursive preorder traversal to process the child node subtree—that is, the block runs for a node before it runs for each of the node’s children, and it processes all children of a node before processing any of that node’s sibling nodes. |
|
public |
enumerateHierarchy(block: function(arg1: SCNNode, arg2: UnsafeMutablePointer<ObjCBool>): void): void SceneKit uses a recursive preorder traversal to process the child node subtree—that is, the block runs for a node before it runs for each of the node’s children, and it processes all children of a node before processing any of that node’s sibling nodes.This method is equivalent to the enumerateChildNodes(_:) method, but unlike that method it also runs the block to process the node itself, not just its child nodes. |
|
public |
Rendering complex node hierarchies can incur a performance cost. |
|
public |
hitTestWithSegmentFromTo(pointA: SCNVector3, pointB: SCNVector3, options: Map<string, Object>): SCNHitTestResult[] Hit-testing is the process of finding elements of a scene located along a specified line segment in the scene’s coordinate space (or that of a particular node in the scene). |
|
public |
insertChildNodeAt(child: SCNNode, index: number): void Adds a node to the node’s array of children at a specified index. |
|
public |
isAnimationPausedForKey(key: string): boolean Required. |
|
public |
localRotateBy(rotation: SCNQuaternion): void |
|
public |
localTranslateBy(translation: SCNVector3): void |
|
public |
lookAt(worldTarget: SCNVector3): void |
|
public |
lookAtUp(worldTarget: SCNVector3, worldUp: SCNVector3, localFront: SCNVector3): void |
|
public |
pauseAnimationForKey(key: string): void This method has no effect if no animation is attached to the object with the specified key. |
|
public |
removeActionForKey(key: string): void If the node is currently running an action that matches the key, SceneKit removes that action from the node, skipping any remaining animation it would perform but keeping any changes already made to the node.Use this method to cancel actions you scheduled using the runAction(:forKey:) or runAction(:forKey:completionHandler:) method. |
|
public |
removeAllActions(): void When SceneKit removes an action from a node, it skips any remaining animation the action would perform. |
|
public |
removeAllAnimations(): void Required. |
|
public |
removeAllAudioPlayers(): void Removes all audio players attached to the node, stopping playback. |
|
public |
removeAllParticleSystems(): void Removes any particle systems directly attached to the node. |
|
public |
removeAnimationForKey(key: string): void Required. |
|
public |
removeAnimationForKeyBlendOutDuration(key: string, duration: number): void |
|
public |
removeAnimationForKeyFadeOutDuration(key: string, duration: number): void Use this method to create smooth transitions between the effects of multiple animations. |
|
public |
removeAudioPlayer(player: SCNAudioPlayer): void This method has no effect if the player parameter does not reference an audio player directly attached to the node. |
|
public |
removeFromParentNode(): void Removing nodes from the node hierarchy serves two purposes. |
|
public |
removeParticleSystem(system: SCNParticleSystem): void This method has no effect if the system parameter does not reference a particle system directly attached to the node. |
|
public |
replaceChildNodeWith(oldChild: SCNNode, newChild: SCNNode): void If both the child and child2 nodes are children of the node, calling this method swaps their positions in the array. |
|
public |
resumeAnimationForKey(key: string): void This method has no effect if no animation is attached to the object with the specified key or if the specified animation is not currently paused. |
|
public |
rotateByAroundTarget(worldRotation: SCNQuaternion, worldTarget: SCNVector3): void |
|
public |
SceneKit begins running a newly added action when it prepares to render the next frame. |
|
public |
runActionCompletionHandler(action: SCNAction, block: function(): void): void The new action is processed the next time SceneKit prepares to render a frame.SceneKit calls your block after the action’s duration is complete. |
|
public |
runActionForKey(action: SCNAction, key: string): void This method is identical to runAction(_:), but the action is stored and identified so that you can retrieve or cancel it later. |
|
public |
runActionForKeyCompletionHandler(action: SCNAction, key: string, block: function(): void): void This method is identical to runAction(_:completionHandler:), but the action is stored and identified so that you can retrieve or cancel it later. |
|
public |
setAnimationSpeedForKey(speed: number, key: string): void Required. |
|
public |
setValueForKey(value: *, key: *) |
|
public |
setValueForKeyPath(value: *, keyPath: *) |
|
public |
setWorldTransform(worldTransform: SCNMatrix4): void |
|
public |
valueForKeyPath(keyPath: *, usePresentation: boolean): * |
|
public |
valueForUndefinedKey(key: string): Object Subclasses can override this method to return an alternate value for undefined keys. |
Inherited Summary
From class NSObject | ||
public static get |
The default returns true. |
|
public static get |
|
|
public static get |
|
|
public static |
The default implementation returns true. |
|
public static |
cancelPreviousPerformRequestsWithTarget(aTarget: Object): void All perform requests having the same target aTarget are canceled. |
|
public static |
cancelPreviousPerformRequestsWithTargetSelectorObject(aTarget: Object, aSelector: function, anArgument: Object): void All perform requests are canceled that have the same target as aTarget, argument as anArgument, and selector as aSelector. |
|
public static |
NSKeyedArchiver calls this method and stores the result inside the archive. |
|
public static |
During keyed unarchiving, instances of the receiver will be decoded as members of the returned class. |
|
public static |
conformsTo(protocol: Object): boolean A class is said to “conform to” a protocol if it adopts the protocol or inherits from another class that adopts it. |
|
public static |
|
|
public static |
defaultPlaceholderForMarkerWithBinding(marker: Object, binding: string): Object The marker can be nil or one of the constants described in Selection Markers. |
|
public static |
The debugger’s print-object command invokes this method to produce a textual description of an object.NSObject's implementation of this method simply prints the name of the class. |
|
public static |
exposeBinding(binding: string): void The bound property will be accessed using key-value-coding compliant methods. |
|
public static |
|
|
public static |
initWithCoder(coder: *): * |
|
public static |
initialize(): void The runtime sends initialize() to each class in a program just before the class, or any class that inherits from it, is sent its first message from within the program. |
|
public static |
instanceMethodFor(aSelector: function): function An error is generated if instances of the receiver can’t respond to aSelector messages.Use this method to ask the class object for the implementation of instance methods only. |
|
public static |
instancesRespondTo(aSelector: function): boolean If aSelector messages are forwarded to other objects, instances of the class are able to receive those messages without error even though this method returns false.To ask the class whether it, rather than its instances, can respond to a particular message, send to the class instead the NSObject protocol instance method responds(to:). |
|
public static |
isKeyExcludedFromWebScript(name: UnsafePointer<Int8>): boolean The default value is true. |
|
public static |
isSelectorExcludedFromWebScript(selector: function): boolean Only methods with valid parameters and return types are exported to the WebKit JavaScript environment. |
|
public static |
isSubclassOf(aClass: Object): boolean Returns a Boolean value that indicates whether the receiving class is a subclass of, or identical to, a given class. |
|
public static |
When an observer for the key is registered with an instance of the receiving class, key-value observing itself automatically observes all of the key paths for the same instance, and sends change notifications for the key to the observer when the value for any of those key paths changes.The default implementation of this method searches the receiving class for a method whose name matches the pattern +keyPathsForValuesAffecting<Key>, and returns the result of invoking that method if it is found. |
|
public static |
load(): void The load() message is sent to classes and categories that are both dynamically loaded and statically linked, but only if the newly loaded class or category implements a method that can respond.The order of initialization is as follows:All initializers in any framework you link to.All +load methods in your image.All C++ static initializers and C/C++ attribute(constructor) functions in your image.All initializers in frameworks that link to you.In addition:A class’s +load method is called after all of its superclasses’ +load methods.A category +load method is called after the class’s own +load method.In a custom implementation of load() you can therefore safely message other unrelated classes from the same image, but any load() methods implemented by those classes may not have run yet.ImportantCustom implementations of the load method for Swift classes bridged to Objective-C are not called automatically. |
|
public static |
resolveClassMethod(sel: function): boolean This method allows you to dynamically provide an implementation for a given selector. |
|
public static |
resolveInstanceMethod(sel: function): boolean This method and resolveClassMethod(_:) allow you to dynamically provide an implementation for a given selector.An Objective-C method is simply a C function that take at least two arguments—self and _cmd. |
|
public static |
setDefaultPlaceholderForMarkerWithBinding(placeholder: Object, marker: Object, binding: string): void The marker can be nil or one of the constants described in Selection Markers. |
|
public static |
setVersion(aVersion: number): void The version number is helpful when instances of the class are to be archived and reused later. |
|
public static |
superclass(): Object Returns the class object for the receiver’s superclass. |
|
public static |
If no version has been set, the default is 0. |
|
public static |
webScriptNameFor(selector: function): string It is your responsibility to ensure that the returned name is unique to the script invoking this method. |
|
public static |
webScriptNameForKey(name: UnsafePointer<Int8>): string Returns the scripting environment name for an attribute specified by a key. |
|
public get |
You can assume that the search for the focus has already been narrowed down to the accessibility element. |
|
public get |
In macOS 10.9 and later, a custom accessibility object that is an NSObject subclass can post accessibility notifications if it meets the following criteria:The lifetime of the custom accessibility object must match the lifetime of the corresponding element in the app's UI.Typically, a custom accessibility object that acts as a proxy for an onscreen UI element gets autoreleased and deallocated immediately after the app responds to an accessibility request. Such an object can’t post accessibility notifications, because all registered observers get removed as soon as the object is deallocated. To correct this, an app must guarantee that a custom accessibility object remains allocated for as long as its corresponding UI element remains visible.The object must post the NSAccessibilityUIElementDestroyedNotification notification at the appropriate time. The appropriate time is most likely to be when the corresponding UI element is removed from the screen, but it can also be when the object itself is deallocated. The object must implement accessibilityNotifiesWhenDestroyed and return true. |
|
public get |
NSObject’s implementation of attributeKeys simply calls [[self classDescription] attributeKeys]. |
|
public get |
This property returns a proxy for the receiving object if the receiver adopts the NSDiscardableContent protocol and still has content that has not been discarded.The proxy calls beginContentAccess() on the receiver to keep the content available as long as the proxy lives, and calls endContentAccess() when the proxy is deallocated.The wrapper object is otherwise a subclass of NSProxy and forwards messages to the original receiver object as an NSProxy does.This method can be used to hide an NSDiscardableContent object's content volatility by creating an object that responds to the same messages but holds the contents of the original receiver available as long as the created proxy lives. Thus hidden, the NSDiscardableContent object (by way of the proxy) can be given out to unsuspecting recipients of the object who would otherwise not know they might have to call beginContentAccess() and endContentAccess() around particular usages (specific to each NSDiscardableContent object) of the NSDiscardableContent object. |
|
public get |
This property is used by Cocoa’s scripting support classes. |
|
public get |
classDescription: NSClassDescription |
|
public get |
|
|
public get |
This method is invoked by NSCoder. |
|
public get |
The object will be encoded as if it were a member of the class. |
|
public get |
|
|
public get |
A subclass can override this method to remove bindings that are exposed by a superclass that are not appropriate for the subclass. |
|
public get |
|
|
public get |
|
|
public get |
The methods of the object are exposed to the script environment. |
|
public get |
objectSpecifier: NSScriptObjectSpecifier |
|
public get |
|
|
public get |
|
|
public get |
webFrame: WebFrame Only implemented by containers that are based on the WebKit’s plug-in architecture. |
|
public get |
webPlugInContainerSelectionColor: CGColor The color should be used for any special drawing when the plug-in is selected. |
|
public |
[key]: * |
|
public |
The activation point for the accessibility element, in screen coordinates. |
|
public |
accessibilityCustomActions: UIAccessibilityCustomAction[] An array of custom actions to display along with the built-in actions. |
|
public |
accessibilityCustomRotors: UIAccessibilityCustomRotor[] |
|
public |
An array of the accessibility elements in the container. |
|
public |
A Boolean value indicating whether the accessibility elements contained within this accessibility element are hidden. |
|
public |
The frame of the accessibility element, in screen coordinates. |
|
public |
|
|
public |
A brief description of the result of performing an action on the accessibility element, in a localized string. |
|
public |
A succinct label that identifies the accessibility element, in a localized string. |
|
public |
The language in which to speak the accessibility element's label, value, and hint. |
|
public |
accessibilityNavigationStyle: UIAccessibilityNavigationStyle The navigation style to apply to the object and its elements. |
|
public |
accessibilityPath: UIBezierPath The path of the element, in screen coordinates. |
|
public |
accessibilityTraits: UIAccessibilityTraits The combination of accessibility traits that best characterize the accessibility element. |
|
public |
The value of the accessibility element, in a localized string. |
|
public |
A Boolean value indicating whether VoiceOver should ignore the elements within views that are siblings of the receiver. |
|
public |
A Boolean value indicating whether the receiver is an accessibility element that an assistive application can access. |
|
public |
Returns a pointer that identifies information about all of the observers that are registered with the observed object. |
|
public |
An NSString-keyed dictionary of the receiver's scriptable properties. |
|
public |
A Boolean value indicating whether VoiceOver should group together the elements that are children of the receiver, regardless of their positions on the screen. |
|
public |
acceptsPreviewPanelControl(panel: QLPreviewPanel): boolean |
|
public |
accessibilityActionDescription(action: string): string this method was deprecated.
User interface classes must implement this method to return descriptions for all actions returned from accessibilityActionNames(). |
|
public |
this method was deprecated.
User interface classes must implement this method. |
|
public |
You can use this method to make complex controls more readily accessible to users. |
|
public |
accessibilityArrayAttributeCount(attribute: string): number If attribute is not an array, an exception is raised. |
|
public |
accessibilityArrayAttributeValues(attribute: string, index: number, maxCount: number): Object[] Note that this method does not take a range. |
|
public |
|
|
public |
this method was deprecated.
User interface classes must implement this method. |
|
public |
accessibilityAttributeValue(attribute: string): Object this method was deprecated.
User interface classes must implement this method. |
|
public |
accessibilityAttributeValueForParameter(attribute: string, parameter: Object): Object this method was deprecated.
If you implement this method, also implement accessibilityParameterizedAttributeNames(). |
|
public |
accessibilityDecrement(): void If your element has the UIAccessibilityTraitAdjustable trait, you must implement this method. |
|
public |
accessibilityElementAt(index: number): Object Returns the accessibility element at the specified index. |
|
public |
Returns the number of accessibility elements in the container. |
|
public |
Override accessibilityElementDidBecomeFocused if you need to know when an assistive technology has set its virtual focus on an accessibility element. |
|
public |
accessibilityElementDidLoseFocus(): void Override accessibilityElementDidLoseFocus if you need to know when an assistive technology has removed its virtual focus from an accessibility element. |
|
public |
Returns a Boolean value indicating whether an assistive technology is focused on the accessibility element. |
|
public |
accessibilityHitTest(point: CGPoint): Object You can assume that the specified point has already been determined to lie within the accessibility element's frame. Override this method to do deeper hit-testing by identifying which child element, if any, contains the point. NSMatrix, for example, identifies which of its cells contains the point and propagates the hit-test to it. If the specified point is not contained within one of the accessibility element's children, either return self or, if available, invoke the superclass's implementation. The default NSView and NSCell implementations test whether the accessibility element is an ignored element and, if it is, return the receiver's first unignored parent; otherwise they return self. |
|
public |
accessibilityIncrement(): void If your element has the UIAccessibilityTraitAdjustable trait, you must implement this method. |
|
public |
accessibilityIndexOfChild(child: Object): number Returns the index of the specified accessibility child in the parent. |
|
public |
accessibilityIsAttributeSettable(attribute: string): boolean this method was deprecated.
User interface classes must implement this method. |
|
public |
this method was deprecated.
When asking for an object's children, do not include ignored children; instead, replace the ignored children with their own unignored children. The same applies when asking for an object's parent: skip the ignored parent and treat the first unignored ancestor as the real parent. |
|
public |
this method was deprecated.
If you implement this method, also implement accessibilityAttributeValue(_:forParameter:). |
|
public |
accessibilityPerformAction(action: string): void this method was deprecated.
User interface classes must implement this method to handle all the actions returned from accessibilityActionNames(). |
|
public |
Implement this method on an element or containing view that can be revealed modally or in a hierarchy. |
|
public |
The exact action performed by this method depends your app, typically toggling the most important state of the app. |
|
public |
accessibilityScroll(direction: UIAccessibilityScrollDirection): boolean Implement this method if a view in the view hierarchy supports a scroll by page action.If the scrolling action succeeds for the specified direction, return true and post the UIAccessibilityPageScrolledNotification notification. |
|
public |
accessibilitySetOverrideValueForAttribute(value: Object, attribute: string): boolean this method was deprecated.
This method is for changing the set of attributes on an instance, as an alternative to subclassing.This method works only on objects whose class already implements the NSAccessibility protocol. |
|
public |
accessibilitySetValueForAttribute(value: Object, attribute: string): void this method was deprecated.
User interface classes must implement this method if any of its attributes are settable. |
|
public |
See Table 1The documentation for property-list constants for the properties for person and group records. |
|
public |
addObserverForKeyPath(observer: NSObject, keyPath: string, options: NSKeyValueObservingOptions, context: Object): void Neither the object receiving this message, nor observer, are retained. |
|
public |
applicationDelegateHandlesKey(sender: NSApplication, key: string): boolean The method should return true if the delegate for the app sender handles the key specified by key, which means it can get or set the scriptable property or element that corresponds to that key. |
|
public |
attemptRecoveryFromErrorOptionIndex(error: Error, recoveryOptionIndex: number): boolean Invoked when an error alert is been presented to the user in an application-modal dialog, and the user has selected an error recovery option specified by error. |
|
public |
authorizationViewCreatedAuthorization(view: SFAuthorizationView): void Sent to the delegate to indicate the authorization object has been created or changed. |
|
public |
authorizationViewDidAuthorize(view: SFAuthorizationView): void Sent to the delegate to indicate the user was authorized and the authorization view was changed to unlocked. |
|
public |
authorizationViewDidDeauthorize(view: SFAuthorizationView): void Sent to the delegate to indicate the user was deauthorized and the authorization view was changed to locked. |
|
public |
authorizationViewDidHide(view: SFAuthorizationView): void This delegate method, if present, is called whenever the isHidden method is called to show or hide the view. |
|
public |
authorizationViewReleasedAuthorization(view: SFAuthorizationView): void This method is called after deauthorization has been approved (either you called the deauthorize: method, or the user clicked an open lock icon and the authorizationViewShouldDeauthorize: delegate method did not cancel the operation), and before the user is deauthorized (that is, before the authorizationViewDidDeauthorize: delegate method is called). |
|
public |
authorizationViewShouldDeauthorize(view: SFAuthorizationView): number The delegate can react to this before deauthorization happens and avoid it by returning false. |
|
public |
awakeAfterUsing(aDecoder: NSCoder): Object You can use this method to eliminate redundant objects created by the coder. |
|
public |
awakeFromNib(): void The nib-loading infrastructure sends an awakeFromNib message to each object recreated from a nib archive, but only after all the objects in the archive have been loaded and initialized. |
|
public |
beginPreviewPanelControl(panel: QLPreviewPanel): void |
|
public |
bindToWithKeyPath(binding: string, observable: Object, keyPath: string, options: Map<string, Object>): void Establishes a binding between a given property of the receiver and the property of a given object specified by a given key path. |
|
public |
candidates(sender: Object): Object[] An input method should look up its currently composed string and return a list of candidate strings that that string might map to. |
|
public |
certificatePanelShowHelp(sender: SFCertificatePanel): number You can use this delegate method to implement custom help if you call the setShowsHelp: method to display a help button in the sheet or panel. |
|
public |
changeColor(sender: Object): void When the user selects a color in an NSColorPanel object, the panel sends a changeColor(_:) action message to the first responder. |
|
public |
changeFont(sender: Object): void Generally this change is because the user changed the font either in the selection of a rich text field or in a whole plain text field. |
|
public |
chooseIdentityPanelShowHelp(sender: SFChooseIdentityPanel): number You can use this delegate method to implement custom help if you call the setShowsHelp: method to display a help button in the sheet or panel. |
|
public |
classForAnnotationClass(annotationClass: Object): Object this method was deprecated.
|
|
public |
this method was deprecated.
|
|
public |
coerceValueForKey(value: Object, key: string): Object The method coerceValueFor<Key>: is used if it exists. |
|
public |
commitComposition(sender: Object): void If an input method implements this method, it is called when the client wants to end the composition session immediately. |
|
public |
A commit is denied if the receiver fails to apply the changes to the model object, perhaps due to a validation error. |
|
public |
commitEditingAndReturnError(): void During autosaving, commit editing may fail, due to a pending edit. |
|
public |
commitEditingWithDelegateDidCommit(delegate: Object, didCommitSelector: function, contextInfo: Object): void The receiver must have been registered as the editor of an object using objectDidBeginEditing:, and has not yet been unregistered by a subsequent invocation of objectDidEndEditing:. |
|
public |
composedString(sender: Object): Object A composed string refers to the buffer that an input method typically maintains to mirror the text contained in the active inline area. |
|
public |
compositionParameterViewDidChangeParameterWithKey(parameterView: QCCompositionParameterView, portKey: string): void Called after an input parameter in the composition parameter view has been edited. |
|
public |
compositionParameterViewShouldDisplayParameterWithKeyAttributes(parameterView: QCCompositionParameterView, portKey: string, portAttributes: Map<AnyHashable, Object>): boolean Allows you to define which composition parameters are visible in the user interface when the composition parameter view refreshes. |
|
public |
compositionPickerViewDidSelect(pickerView: QCCompositionPickerView, composition: QCComposition): void Quartz Composer invokes this method when the selected composition in the composition picker view changes. |
|
public |
compositionPickerViewDidStartAnimating(pickerView: QCCompositionPickerView): void Quartz Composer invokes this method when the composition picker view starts animating a composition. |
|
public |
compositionPickerViewWillStopAnimating(pickerView: QCCompositionPickerView): void Quartz Composer invokes this method whenever the composition picker view stops animating a composition. |
|
public |
controlTextDidBeginEditing(obj: Notification): void This method is invoked when the user begins editing text in a control such as a text field or a form field. |
|
public |
controlTextDidChange(obj: Notification): void This method is invoked when text in a control such as a text field or form changes. |
|
public |
controlTextDidEndEditing(obj: Notification): void This method is invoked when the user stops editing text in a control such as a text field or form. |
|
public |
This is a convenience method for classes that adopt the NSCopying protocol. |
|
public |
copyScriptingValueForKeyWithProperties(value: Object, key: string, properties: Map<string, Object>): Object You can override the copyScriptingValue method to take more control when your application is sent a duplicate command. |
|
public |
dictionaryWithValuesForKeys(keys: string[]): Map<string, Object> The default implementation invokes value(forKey:) for each key in keys and substitutes NSNull values in the dictionary for returned nil values. |
|
public |
didChangeValueForKey(key: string): void Use this method when implementing key-value observer compliance manually to inform the observed object that the value at key has just changed. |
|
public |
didChangeValueForKeyWithSetMutationUsing(key: string, mutationKind: NSKeyValueSetMutationKind, objects: Set<AnyHashable>): void Use this method when implementing key-value observer compliance manually. |
|
public |
didChangeValuesAtForKey(changeKind: NSKeyValueChange, indexes: Set, key: string): void Use this method when implementing key-value-observing compliance manually.Special ConsiderationsYou rarely need to override this method in subclasses, but if you do, be sure to call super. |
|
public |
didCommandByClient(aSelector: function, sender: Object): boolean This method is called when the system binds a key down event to an action method. |
|
public |
didMatchString(instance: PDFSelection): void Called for every match found during a find operation. |
|
public |
discardEditing(): void Causes the receiver to discard any changes, restoring the previous values. |
|
public |
documentDidBeginDocumentFind(notification: Notification): void Called when the PDFDocumentDidBeginFindNotification notification is posted. |
|
public |
documentDidBeginPageFind(notification: Notification): void Called when the PDFDocumentDidBeginPageFindNotification notification is posted. |
|
public |
documentDidEndDocumentFind(notification: Notification): void Called when the PDFDocumentDidEndFindNotification notification is posted. |
|
public |
documentDidEndPageFind(notification: Notification): void Called when the PDFDocumentDidEndPageFindNotification notification is posted. |
|
public |
documentDidFindMatch(notification: Notification): void Called when the PDFDocumentDidFindMatchNotification notification is posted. |
|
public |
documentDidUnlock(notification: Notification): void Called when the PDFDocumentDidUnlockNotification notification is posted. |
|
public |
doesContain(object: Object): boolean Currently, doesContain(_:) messages are never sent to any object from within Cocoa itself. |
|
public |
doesNotRecognizeSelector(aSelector: function): void The runtime system invokes this method whenever an object receives an aSelector message it can’t respond to or forward. |
|
public |
endPreviewPanelControl(panel: QLPreviewPanel): void |
|
public |
exceptionHandlerShouldHandleMask(sender: NSExceptionHandler, exception: NSException, aMask: number): boolean Implemented by the delegate to evaluate whether the delegating NSExceptionHandler instance should handle a given exception. |
|
public |
exceptionHandlerShouldLogExceptionMask(sender: NSExceptionHandler, exception: NSException, aMask: number): boolean Implemented by the delegate to evaluate whether the delegating NSExceptionHandler instance should log a given exception. |
|
public |
fileManagerShouldProceedAfterError(fm: FileManager, errorInfo: Map<AnyHashable, Object>): boolean this method was deprecated.
An NSFileManager object, manager, sends this message for each error it encounters when copying, moving, removing, or linking files or directories. |
|
public |
fileManagerWillProcessPath(fm: FileManager, path: string): void this method was deprecated.
You can implement this method in your handler to monitor file operations. |
|
public |
fileTransferServicesAbortCompleteError(inServices: OBEXFileTransferServices, inError: OBEXError): void |
|
public |
fileTransferServicesConnectionCompleteError(inServices: OBEXFileTransferServices, inError: OBEXError): void |
|
public |
fileTransferServicesCopyRemoteFileCompleteError(inServices: OBEXFileTransferServices, inError: OBEXError): void |
|
public |
fileTransferServicesCopyRemoteFileProgressTransferProgress(inServices: OBEXFileTransferServices, inProgressDescription: Map<AnyHashable, Object>): void |
|
public |
fileTransferServicesCreateFolderCompleteErrorFolder(inServices: OBEXFileTransferServices, inError: OBEXError, inFolderName: string): void |
|
public |
fileTransferServicesDisconnectionCompleteError(inServices: OBEXFileTransferServices, inError: OBEXError): void |
|
public |
fileTransferServicesFilePreparationCompleteError(inServices: OBEXFileTransferServices, inError: OBEXError): void |
|
public |
fileTransferServicesPathChangeCompleteErrorFinalPath(inServices: OBEXFileTransferServices, inError: OBEXError, inPath: string): void |
|
public |
fileTransferServicesRemoveItemCompleteErrorRemovedItem(inServices: OBEXFileTransferServices, inError: OBEXError, inItemName: string): void |
|
public |
fileTransferServicesRetrieveFolderListingCompleteErrorListing(inServices: OBEXFileTransferServices, inError: OBEXError, inListing: Object[]): void |
|
public |
fileTransferServicesSendFileCompleteError(inServices: OBEXFileTransferServices, inError: OBEXError): void |
|
public |
fileTransferServicesSendFileProgressTransferProgress(inServices: OBEXFileTransferServices, inProgressDescription: Map<AnyHashable, Object>): void |
|
public |
finalize(): void this method was deprecated.
The garbage collector invokes this method on the receiver before disposing of the memory it uses. |
|
public |
finalizeForWebScript(): void This method is invoked on objects exposed to the scripting environment just before the scripting environment is reset. |
|
public |
fontManagerWillIncludeFont(sender: Object, fontName: string): boolean this method was deprecated.
In macOS versions 10.2 and earlier, this method is invoked repeatedly as necessary whenever the Font panel needs updating, such as when the Font panel is first loaded, and when the user selects a family name to see which typefaces in that family are available. |
|
public |
forwardingTargetFor(aSelector: function): Object If an object implements (or inherits) this method, and returns a non-nil (and non-self) result, that returned object is used as the new receiver object and the message dispatch resumes to that new object. |
|
public |
handleClient(event: NSEvent, sender: Object): boolean Handles key down and mouse events. |
|
public |
imageBrowserBackgroundWasRightClickedWith(aBrowser: IKImageBrowserView, event: NSEvent): void This method signals that the user either right-clicked the background or left-clicked it with the Alt key pressed. |
|
public |
imageBrowserCellWasDoubleClickedAt(aBrowser: IKImageBrowserView, index: number): void This method signals that the user double-clicked an item in the image browser view. |
|
public |
imageBrowserCellWasRightClickedAtWith(aBrowser: IKImageBrowserView, index: number, event: NSEvent): void This method signals that the user either right-clicked an item in the browser or left-clicked the item with the Alt key pressed. |
|
public |
imageBrowserGroupAt(aBrowser: IKImageBrowserView, index: number): Map<AnyHashable, Object> This method is optional. |
|
public |
imageBrowserItemAt(aBrowser: IKImageBrowserView, index: number): Object Your data source must implement this method. |
|
public |
imageBrowserMoveItemsAtTo(aBrowser: IKImageBrowserView, indexes: Set, destinationIndex: number): boolean This method is optional. |
|
public |
imageBrowserRemoveItemsAt(aBrowser: IKImageBrowserView, indexes: Set): void This method is optional. |
|
public |
imageBrowserSelectionDidChange(aBrowser: IKImageBrowserView): void This method signals that the user changes the selection in the image browser view. |
|
public |
imageBrowserWriteItemsAtTo(aBrowser: IKImageBrowserView, itemIndexes: Set, pasteboard: NSPasteboard): number This method is optional. |
|
public |
Your data source must implement this method. |
|
public |
Your data source must implement this method. |
|
public |
This method is optional. |
|
public |
imageTitle(): string This method is optional. |
|
public |
Your data source must implement this method. |
|
public |
This method is optional. |
|
public |
indexOfAccessibilityElement(element: Object): number Returns the index of the specified accessibility element. |
|
public |
indicesOfObjectsByEvaluatingObjectSpecifier(specifier: NSScriptObjectSpecifier): number[] Containers that want to evaluate some specifiers on their own should implement this method. |
|
public |
infoForBinding(binding: string): Map<string, Object> This method is mostly for use by subclasses which want to analyze the existing bindings of an object. |
|
public |
inputTextClient(string: string, sender: Object): boolean An input method should implement this method when using key binding (that is, it implements didCommand(by:client:)). |
|
public |
inputTextKeyModifiersClient(string: string, keyCode: number, flags: number, sender: Object): boolean Receives Unicode, the key code that generated it, and any modifier flags. |
|
public |
insertValueAtInPropertyWithKey(value: Object, index: number, key: string): void The method insertIn<Key>:atIndex: is invoked if it exists. |
|
public |
insertValueInPropertyWithKey(value: Object, key: string): void The method insertIn<Key>: is used if it exists. |
|
public |
inverseForRelationshipKey(relationshipKey: string): string NSObject’s implementation of inverseForRelationshipKey: simply invokes [[self classDescription] inverseForRelationshipKey:relationshipKey]. |
|
public |
invokeDefaultMethodWithArguments(_arguments: Object[]): Object Executes when a script attempts to invoke a method on an exposed object directly. |
|
public |
invokeUndefinedMethodFromWebScriptWithArguments(name: string, _arguments: Object[]): Object This method is invoked when a script attempts to invoke a method not directly exported to the scripting environment. |
|
public |
isCaseInsensitiveLike(object: string): boolean Currently, isCaseInsensitiveLike(_:) messages are never sent to any object from within Cocoa itself.The default implementation for this method provided by NSObject returns false. |
|
public |
During the evaluation of an NSWhoseSpecifier object that contains a test whose operator is NSEqualToComparison, an isEqual(to:) message may be sent to each potentially specified object, if neither the potentially specified object nor the object being tested against implements a scriptingIsEqual(to:) method.The default implementation for this method provided by NSObject returns true if an isEqualTo: message sent to the same object would return true. |
|
public |
isGreaterThan(object: Object): boolean During the evaluation of an NSWhoseSpecifier object that contains a test whose operator is NSGreaterThanComparison, an isGreaterThan(:) message may be sent to each potentially specified object, if the potentially specified object does not implement a scriptingIsGreaterThan(:) method and the object being tested against does not implement a scriptingIsLessThanOrEqual(to:) method.The default implementation for this method provided by NSObject returns true if a compare: message sent to the same object would return NSOrderedDescending. |
|
public |
isGreaterThanOrEqualTo(object: Object): boolean During the evaluation of an NSWhoseSpecifier object that contains a test whose operator is NSGreaterThanOrEqualToComparison, anisGreaterThanOrEqual(to:) message may be sent to each potentially specified object, if the potentially specified object does not implement a scriptingIsGreaterThanOrEqual(to:) method and the object being tested against does not implement a scriptingIsLessThan(_:) method.The default implementation for this method provided by NSObject returns true if a compare: message sent to the same object would return NSOrderedSame or NSOrderedDescending. |
|
public |
isInstanceOf(aClass: Object): boolean |
|
public |
isLessThan(object: Object): boolean During the evaluation of an NSWhoseSpecifier object that contains a test whose operator is NSLessThanComparison, an isLessThan(:) message may be sent to each potentially specified object, if the potentially specified object does not implement a scriptingIsLessThan(:) method and the object being tested against does not implement a scriptingIsGreaterThanOrEqual(to:) method.The default implementation for this method provided by NSObject method returns true if a compare: message sent to the same object would return NSOrderedAscending. |
|
public |
isLessThanOrEqualTo(object: Object): boolean During the evaluation of an NSWhoseSpecifier object that contains a test whose operator is NSLessThanOrEqualToComparison, an isLessThanOrEqual(to:) message may be sent to each potentially specified object, if the potentially specified object does not implement a scriptingIsLessThanOrEqual(to:) method and the object being tested against does not implement a scriptingIsGreaterThan(_:) method.The default implementation for this method provided by NSObject method returns true if a compare: message sent to the same object would return NSOrderedAscending or NSOrderedSame. |
|
public |
Currently, isLike(_:) messages are never sent to any object from within Cocoa itself.The default implementation for this method provided by NSObject method returns false. |
|
public |
isNotEqualTo(object: Object): boolean Currently, isNotEqual(to:) messages are never sent to any object from within Cocoa itself.The default implementation for this method provided by NSObject method returns true if an isEqual: message sent to the same object would return false. |
|
public |
layerShouldInheritContentsScaleFrom(layer: CALayer, newScale: number, window: NSWindow): boolean When a resolution change occurs for a given window, the system traverses the layer trees in that window to decide what action, if any, to take for each layer. |
|
public |
If the receiver is an instance, aSelector should refer to an instance method; if the receiver is a class, it should refer to a class method. |
|
public |
mutableArrayValueForKey(key: string): Array Objects added to the mutable array become related to the receiver, and objects removed from the mutable array become unrelated. |
|
public |
mutableArrayValueForKeyPath(keyPath: string): Array See mutableArrayValue(forKey:) for additional details. |
|
public |
This is a convenience method for classes that adopt the NSMutableCopying protocol. |
|
public |
Objects added to the mutable set proxy become related to the receiver, and objects removed from the mutable set become unrelated. |
|
public |
mutableOrderedSetValueForKeyPath(keyPath: string): Set See mutableOrderedSetValue(forKey:) for additional details. |
|
public |
mutableSetValueForKey(key: string): Set Objects added to the mutable set proxy become related to the receiver, and objects removed from the mutable set become unrelated. |
|
public |
mutableSetValueForKeyPath(keyPath: string): Set See mutableSetValue(forKey:) for additional details. |
|
public |
namesOfPromisedFilesDroppedAtDestination(dropDestination: string): string[] this method was deprecated.
This method is invoked when the drop has been accepted by the destination and the destination, in the case of another Cocoa application, invokes the NSDraggingInfo method namesOfPromisedFilesDropped(atDestination:). |
|
public |
newScriptingObjectOfForValueForKeyWithContentsValue(objectClass: Object, key: string, contentsValue: Object, properties: Map<string, Object>): Object You can override the newScriptingObjectOfClass method to take more control when your application is sent a make command. |
|
public |
numberOfGroupsInImageBrowser(aBrowser: IKImageBrowserView): number This method is optional. |
|
public |
numberOfItemsInImageBrowser(aBrowser: IKImageBrowserView): number Your data source must implement this method. |
|
public |
objectDidBeginEditing(editor: Object): void This message should be sent to the receiver when editor has uncommitted changes that can affect the receiver. |
|
public |
objectDidEndEditing(editor: Object): void This message should be sent to the receiver when editor has finished editing a property belonging to the receiver. |
|
public |
observeValueForKeyPathOf(keyPath: string, object: Object, change: Map<NSKeyValueChangeKey, Object>, context: Object): void For an object to begin sending change notification messages for the value at keyPath, you send it an addObserver(_:forKeyPath:options:context:) message, naming the observing object that should receive the messages. |
|
public |
optionDescriptionsForBinding(binding: string): NSAttributeDescription[] The NSAttributeDescription instances in the array are used by Interface Builder to build the options editor user interface of the bindings inspector.The option name displayed for the option in the bindings inspector is based on the value of the NSAttributeDescription method name. |
|
public |
originalString(sender: Object): string Return the a string that consists of the precomposed unicode characters. |
|
public |
pasteboardChangedOwner(sender: NSPasteboard): void Pasteboard owners only need to implement this method if they need to know when they have lost ownership.The owner is not able to read the contents of the pasteboard when responding to this method. |
|
public |
pasteboardProvideDataForType(sender: NSPasteboard, type: string): void The receiver should have been previously declared in a declareTypes(:owner:) message.The requested data should be written to sender using the setData(:forType:), setPropertyList(:forType:), or setString(:forType:) method. |
|
public |
performActionFor(person: ABPerson, identifier: string): void If the property returned by actionProperty() is a multivalue property, identifier contains the unique identifier of the value selected. |
|
public |
performOnWithWaitUntilDone(aSelector: function, thr: Thread, arg: Object, wait: boolean): void You can use this method to deliver messages to other threads in your application. |
|
public |
performOnWithWaitUntilDoneModes(aSelector: function, thr: Thread, arg: Object, wait: boolean, array: string[]): void You can use this method to deliver messages to other threads in your application. |
|
public |
performSelectorInBackgroundWith(aSelector: function, arg: Object): void This method creates a new thread in your application, putting your application into multithreaded mode if it was not already. |
|
public |
performSelectorOnMainThreadWithWaitUntilDone(aSelector: function, arg: Object, wait: boolean): void You can use this method to deliver messages to the main thread of your application. |
|
public |
performSelectorOnMainThreadWithWaitUntilDoneModes(aSelector: function, arg: Object, wait: boolean, array: string[]): void You can use this method to deliver messages to the main thread of your application. |
|
public |
performWithAfterDelay(aSelector: function, anArgument: Object, delay: number): void This method sets up a timer to perform the aSelector message on the current thread’s run loop. |
|
public |
performWithAfterDelayInModes(aSelector: function, anArgument: Object, delay: number, modes: RunLoopMode[]): void This method sets up a timer to perform the aSelector message on the current thread’s run loop. |
|
public |
prepareForInterfaceBuilder(): void When Interface Builder instantiates a class with the IB_DESIGNABLE attribute, it calls this method to let the resulting object know that it was created at design time. |
|
public |
provideImageDataBytesPerRowOriginSizeUserInfo(data: Object, rowbytes: number, x: number, y: number, width: number, height: number, info: Object): void You can supply the image provider to these methods of the CIImage class: imageWithImageProvider:size::format:colorSpace:options: to create a CIImage object from image datainit(imageProvider:size:_:format:colorSpace:options:) to initialize an existing CIImage with dataYou initialize the given bitmap with the subregion specified by the arguments x, y, width, and height. |
|
public |
quartzFilterManagerDidAdd(sender: QuartzFilterManager, filter: QuartzFilter): void |
|
public |
quartzFilterManagerDidModifyFilter(sender: QuartzFilterManager, filter: QuartzFilter): void |
|
public |
quartzFilterManagerDidRemove(sender: QuartzFilterManager, filter: QuartzFilter): void |
|
public |
quartzFilterManagerDidSelect(sender: QuartzFilterManager, filter: QuartzFilter): void |
|
public |
readLinkQualityForDeviceComplete(controller: Object, device: IOBluetoothDevice, info: UnsafeMutablePointer<BluetoothHCILinkQualityInfo>, error: IOReturn): void This delegate gets invoked when an read link quality command complete event occurs. |
|
public |
readRSSIForDeviceComplete(controller: Object, device: IOBluetoothDevice, info: UnsafeMutablePointer<BluetoothHCIRSSIInfo>, error: IOReturn): void This delegate gets invoked when an RSSI command complete event occurs. |
|
public |
removeObserverForKeyPath(observer: NSObject, keyPath: string): void It is an error to call removeObserver(:forKeyPath:) for an object that has not previously been registered as an observer.Be sure to invoke this method (or removeObserver(:forKeyPath:context:)) before any object specified in addObserver(_:forKeyPath:options:context:) is deallocated. |
|
public |
removeValueAtFromPropertyWithKey(index: number, key: string): void The method removeFrom<Key>AtIndex: is invoked if it exists. |
|
public |
replaceValueAtInPropertyWithKeyWithValue(index: number, key: string, value: Object): void The method replaceIn<Key>:atIndex: is invoked if it exists. |
|
public |
replacementObjectFor(aCoder: NSCoder): Object An object might encode itself into an archive, but encode a proxy for itself if it’s being encoded for distribution. |
|
public |
saveOptionsShouldShowUTType(saveOptions: IKSaveOptions, utType: string): boolean Called to determine if the specified uniform type identifier should be shown in the save panel. |
|
public |
scriptingBeginsWith(object: Object): boolean Returns true if, in a scripting comparison, the compared object matches the beginning of object. |
|
public |
scriptingContains(object: Object): boolean Returns true if, in a scripting comparison, the compared object contains object. |
|
public |
scriptingEndsWith(object: Object): boolean Returns true if, in a scripting comparison, the compared object matches the end of object. |
|
public |
scriptingIsEqualTo(object: Object): boolean Returns true if, in a scripting comparison, the compared object is equal to object. |
|
public |
scriptingIsGreaterThan(object: Object): boolean Returns true if, in a scripting comparison, the compared object is greater than object. |
|
public |
scriptingIsGreaterThanOrEqualTo(object: Object): boolean Returns true if, in a scripting comparison, the compared object is greater than or equal to object. |
|
public |
scriptingIsLessThan(object: Object): boolean Returns true if, in a scripting comparison, the compared object is less than object. |
|
public |
scriptingIsLessThanOrEqualTo(object: Object): boolean Returns true if, in a scripting comparison, the compared object is less than or equal to object. |
|
public |
scriptingValueFor(objectSpecifier: NSScriptObjectSpecifier): Object You can override this method to customize the evaluation of object specifiers without requiring that the scripting container make up indexes for contained objects that don't naturally have indexes (as can be the case if you implement indicesOfObjects(byEvaluatingObjectSpecifier:) instead).Your override of this method doesn't need to also invoke any of the NSScriptCommand error signaling methods, though it can, to record very specific information. |
|
public |
setNilValueForKey(key: string): void Subclasses can override this method to handle the request in some other way, such as by substituting 0 or a sentinel value for nil and invoking setValue(_:forKey:) again or setting the variable directly. |
|
public |
setValueForKey(value: Object, key: string): void If key identifies a to-one relationship, relate the object specified by value to the receiver, unrelating the previously related object if there was one. |
|
public |
setValueForKeyPath(value: Object, keyPath: string): void The default implementation of this method gets the destination object for each relationship using value(forKey:), and sends the final object a setValue(_:forKey:) message.Special ConsiderationsWhen using this method, and the destination object does not implement an accessor for the value, the default behavior is for that object to retain value rather than copy or assign value. |
|
public |
setValueForUndefinedKey(value: Object, key: string): void Subclasses can override this method to handle the request in some other way. |
|
public |
setValuesForKeys(keyedValues: Map<string, Object>): void The default implementation invokes setValue(_:forKey:) for each key-value pair, substituting nil for NSNull values in keyedValues. |
|
public |
shouldEnableActionFor(person: ABPerson, identifier: string): boolean If the property returned by actionProperty() is a multivalue property, identifier contains the unique identifier of the value selected. |
|
public |
textStorageDidProcessEditing(notification: Notification): void this method was deprecated.
|
|
public |
textStorageWillProcessEditing(notification: Notification): void this method was deprecated.
|
|
public |
If the property returned by actionProperty() is a multivalue property, identifier contains the unique identifier of the value selected. |
|
public |
Removes a given binding between the receiver and a controller. |
|
public |
validModesForFontPanel(fontPanel: NSFontPanel): number The mode masks are defined in Mode Masks. |
|
public |
validateMenuItem(menuItem: NSMenuItem): boolean The object implementing this method must be the target of menuItem. |
|
public |
validateToolbarItem(item: NSToolbarItem): boolean NSToolbar only calls this method for image items.Note validateToolbarItem(_:) is called very frequently, so it must be efficient.If the receiver is the target for the actions of multiple toolbar items, it’s necessary to determine which toolbar item theItem refers to by testing the itemIdentifier.-(BOOL)validateToolbarItem:(NSToolbarItem )toolbarItem { BOOL enable = NO; if ([[toolbarItem itemIdentifier] isEqual:SaveDocToolbarItemIdentifier]) { // We will return YES (enable the save item) // only when the document is dirty and needs saving enable = [self isDocumentEdited]; } else if ([[toolbarItem itemIdentifier] isEqual:NSToolbarPrintItemIdentifier]) { // always enable print for this window enable = YES; } return enable; } -(BOOL)validateToolbarItem:(NSToolbarItem )toolbarItem { BOOL enable = NO; if ([[toolbarItem itemIdentifier] isEqual:SaveDocToolbarItemIdentifier]) { // We will return YES (enable the save item) // only when the document is dirty and needs saving enable = [self isDocumentEdited]; } else if ([[toolbarItem itemIdentifier] isEqual:NSToolbarPrintItemIdentifier]) { // always enable print for this window enable = YES; } return enable; } |
|
public |
validateValueForKey(ioValue: AutoreleasingUnsafeMutablePointer<AnyObject?>, inKey: string): void The default implementation of this method searches the class of the receiver for a validation method whose name matches the pattern validate<Key>:error:. |
|
public |
validateValueForKeyPath(ioValue: AutoreleasingUnsafeMutablePointer<AnyObject?>, inKeyPath: string): void The default implementation gets the destination object for each relationship using value(forKey:) and returns the result of a validateValue(_:forKey:) message to the final object.Handling Errors in Swift: In Swift, this method returns Void and is marked with the throws keyword to indicate that it throws an error in cases of failure. |
|
public |
valueAtInPropertyWithKey(index: number, key: string): Object This actually works with a single-value key as well if index is 0. |
|
public |
valueClassForBinding(binding: string): Object This method is used by Interface Builder to determine the appropriate transformers for a binding. |
|
public |
valueForKey(key: string): Object The search pattern that valueForKey: uses to find the correct value to return is described in Accessor Search Patterns in Key-Value Coding Programming Guide. |
|
public |
valueForKeyPath(keyPath: string): Object The default implementation gets the destination object for each relationship using value(forKey:) and returns the result of a value(forKey:) message to the final object. |
|
public |
valueForUndefinedKey(key: string): Object Subclasses can override this method to return an alternate value for undefined keys. |
|
public |
valueWithNameInPropertyWithKey(name: string, key: string): Object The method valueIn<Key>WithName: is used if it exists. |
|
public |
valueWithUniqueIDInPropertyWithKey(uniqueID: Object, key: string): Object The method valueIn<Key>WithUniqueID: is invoked if it exists. |
|
public |
viewStringForToolTipUserData(view: NSView, tag: NSToolTipTag, point: CGPoint, data: Object): string userData is additional information provided by the creator of the tool tip rectangle. |
|
public |
webPlugInContainerLoadInFrame(request: URLRequest, target: string): void If the frame specified by target is not found, a new window is opened, loaded with the URL request, and given the specified frame name. |
|
public |
webPlugInContainerShowStatus(message: string): void Tells the container to show a status message. |
|
public |
webPlugInDestroy(): void Typically, this method frees the memory and other resources used by the plug-in. |
|
public |
webPlugInInitialize(): void Tells the plug-in to perform one-time initialization. |
|
public |
webPlugInMainResourceDidFailWithError(error: Error): void This message is invoked when the underlying NSURLConnection object for the main resource sends the connection:didFailWithError: message to its delegate. |
|
public |
This message is invoked when the WebPlugInShouldLoadMainResourceKey plug-in command-line argument is set to false and the underlying NSURLConnection object for the main resource sends the connectionDidFinishLoading: message to its delegate. |
|
public |
webPlugInMainResourceDidReceive(response: URLResponse): void This message is invoked when the WebPlugInShouldLoadMainResourceKey plug-in command-line argument is set to false and the underlying NSURLConnection object for the main resource sends the connection:didReceiveResponse: message to its delegate. |
|
public |
webPlugInSetIsSelected(isSelected: boolean): void This may be used, for example, to change the plug-in’s appearance when it is selected by the user. |
|
public |
webPlugInStart(): void The plug-in usually begins its primary task (such as drawing, playing sounds, or animating) in this method. |
|
public |
webPlugInStop(): void This method may be called more than once, provided that the application has already called webPlugInInitialize() and that each call to this method is preceded by a call to webPlugInStart(). |
|
public |
willChangeValueForKey(key: string): void Use this method when implementing key-value observer compliance manually to inform the observed object that the value at key is about to change.The change type of this method is NSKeyValueChangeSetting.ImportantAfter the values have been changed, a corresponding didChangeValue(forKey:) must be invoked with the same parameter. |
|
public |
willChangeValueForKeyWithSetMutationUsing(key: string, mutationKind: NSKeyValueSetMutationKind, objects: Set<AnyHashable>): void Use this method when implementing key-value observer compliance manually.ImportantAfter the values have been changed, a corresponding didChangeValue(forKey:withSetMutation:using:) must be invoked with the same parameters.Special ConsiderationsYou rarely need to override this method in subclasses, but if you do, be sure to call super. |
|
public |
willChangeValuesAtForKey(changeKind: NSKeyValueChange, indexes: Set, key: string): void Use this method when implementing key-value-observing compliance manually.ImportantAfter the values have been changed, a corresponding didChange(_:valuesAt:forKey:) must be invoked with the same parameters.Special ConsiderationsYou rarely need to override this method in subclasses, but if you do, be sure to call super. |
|
public |
workflowControllerDidError(controller: AMWorkflowController, error: Error): void Invoked when the receiver's workflow encounters an error. |
|
public |
workflowControllerDidRun(controller: AMWorkflowController, action: AMAction): void Invoked when an action in the receiver's workflow is finished running. |
|
public |
workflowControllerDidStop(controller: AMWorkflowController): void Tells the delegate that the workflow controller object has stopped. |
|
public |
workflowControllerWillRun(controller: AMWorkflowController, action: AMAction): void Invoked when an action in the receiver's workflow is about to run. |
|
public |
workflowControllerWillStop(controller: AMWorkflowController): void Tells the delegate that the workflow controller object is about to stop. |
Static Public Members
public static get localFront: SCNVector3 source
public static get localRight: SCNVector3 source
public static get localUp: SCNVector3 source
Static Public Methods
public static nodeWithGeometry(geometry: SCNGeometry): SCNNode source
Constructor for JSExport compatibility
Params:
Name | Type | Attribute | Description |
geometry | SCNGeometry |
|
The geometry to be attached. |
Public Constructors
public constructor(geometry: SCNGeometry) source
Creates and returns a node object with the specified geometry attached.
Override:
NSObject#constructorParams:
Name | Type | Attribute | Description |
geometry | SCNGeometry |
|
The geometry to be attached. |
Public Members
public get actionKeys: string[] source
Use this property to list actions you scheduled using the runAction(:forKey:) or runAction(:forKey:completionHandler:) method.
public get animationKeys: string[] source
This array contains all keys for which animations are attached to the object, or is empty if there are no attached animations. The ordering of animation keys in the array is arbitrary.
public get audioPlayers: SCNAudioPlayer[] source
Positional audio effects from a player attached to a node are based on that node’s position relative to the audioListener position in the scene.After an audio player completes playback, SceneKit automatically removes it from the node. Therefore, this array always contains audio players that are currently playing back audio.
public set boundingBox: * source
public get boundingBox: {min: SCNVector3, max: SCNVector3} source
The minimum and maximum corner points of the object’s bounding box.
public get boundingSphere: {center: SCNVector3, radius: number} source
Scene Kit defines a bounding sphere in the local coordinate space using a center point and a radius. For example, if a node’s bounding sphere has the center point {3, 1, 4} and radius 2.0, all points in the vertex data of node’s geometry (and any geometry attached to its child nodes) lie within 2.0 units of the center point.The coordinates provided when reading this property are valid only if the object has a volume to be measured. For a geometry containing no vertex data or a node containing no geometry (and whose child nodes, if any, contain no geometry), the values center and radius are both zero.
public castsShadow: boolean source
A Boolean value that determines whether SceneKit renders the node’s contents into shadow maps.
public get childNodes: SCNNode[] source
An array of the node’s children in the scene graph hierarchy.
public constraints: SCNConstraint[] source
A list of constraints affecting the node’s transformation.
public set eulerAngles: * source
public get eulerAngles: SCNVector3 source
The node’s orientation, expressed as pitch, yaw, and roll angles, each in radians. Animatable.
public filters: CIFilter[] source
An array of Core Image filters to be applied to the rendered contents of the node.
public focusBehavior: SCNNodeFocusBehavior source
public get geometry: * source
public set geometry: * source
public get hasActions: boolean source
This value is true if the node has any executing actions; otherwise the value is false.
public get inverseViewTransform: * source
public isHidden: boolean source
A Boolean value that determines the visibility of the node’s contents. Animatable.
public isPaused: boolean source
A Boolean value that determines whether to run actions and animations attached to the node and its child nodes.
public get lightViewProjectionTransform: * source
public movabilityHint: SCNMovabilityHint source
A value that indicates how SceneKit should handle the node when rendering movement-related effects.
public set opacity: * source
public set orientation: * source
public get orientation: SCNQuaternion source
The node’s orientation, expressed as a quaternion. Animatable.
public get particleSystems: SCNParticleSystem[] source
An array of SCNParticleSystem objects directly attached to the node. This array does not include particle systems attached to the node's child nodes. For details on particle systems, see SCNParticleSystem.
public set physicsBody: * source
public get physicsBody: * source
public pivot: SCNMatrix4 source
The pivot point for the node’s position, rotation, and scale. Animatable.
public set position: * source
public get presentation: SCNNode source
When you use implicit animation (see SCNTransaction) to change a node’s properties, those node properties are set immediately to their target values, even though the animated node content appears to transition from the old property values to the new. During the animation SceneKit maintains a copy of the node, called the presentation node, whose properties reflect the transitory values determined by any in-flight animations currently affecting the node. The presentation node’s properties provide a close approximation to the version of the node that is currently displayed. SceneKit also uses the presentation node when computing the results of explicit animations, physics, and constraints.Do not modify the properties of the presentation node. (Attempting to do so results in undefined behavior.) Instead, you use the presentation node to read current animation values—for example, to create a new animation starting at those values. The presentation node has no parent or child nodes. To access animated properties of related nodes, use the node’s own parent and childNodes properties and the presentation property of each related node.
public get projectionTransform: * source
public rendererDelegate: SCNNodeRendererDelegate source
An object responsible for rendering custom contents for the node using Metal or OpenGL.
public renderingOrder: number source
The order the node’s content is drawn in relative to that of other nodes.
public set rotation: * source
public get rotation: * source
public set scale: * source
public get scale: * source
public get shadowProjectionTransform: * source
public skinner: SCNSkinner source
The skinner object responsible for skeletal animations of node’s contents.
public get transform: SCNMatrix4 source
The transformation applied to the node relative to its parent. Animatable.
public set transform: * source
public get viewProjectionTransform: * source
public get viewTransform: * source
public get worldFront: SCNVector3 source
public set worldPosition: * source
public get worldPosition: * source
public get worldRight: SCNVector3 source
public get worldTransform: SCNMatrix4 source
A world transform is the node’s coordinate space transformation relative to the scene’s coordinate space. This transformation is the concatenation of the node’s transform property with that of its parent node, the parent’s parent, and so on up to the rootNode object of the scene.
public get worldUp: SCNVector3 source
Public Methods
public actionForKey(key: string): SCNAction source
Use this method to retrieve actions you scheduled using the runAction(:forKey:) or runAction(:forKey:completionHandler:) method.
Params:
Name | Type | Attribute | Description |
key | string | A string that uniquely identifies a action. |
public addAnimationForKey(animation: CAAnimation, key: string): void source
Newly added animations begin executing after the current run loop cycle ends.SceneKit does not define any requirements for the contents of the key parameter—it need only be unique among the keys for other animations you add. If you add an animation with an existing key, this method overwrites the existing animation.
Params:
Name | Type | Attribute | Description |
animation | CAAnimation | The animation object to be added. |
|
key | string |
|
An string identifying the animation for later retrieval. You may pass nil if you don’t need to reference the animation later. |
Return:
void |
public addAnimationPlayerForKey(player: SCNAnimationPlayer, key: string): void source
Params:
Name | Type | Attribute | Description |
player | SCNAnimationPlayer | ||
key | string |
|
Return:
void |
public addAudioPlayer(player: SCNAudioPlayer): void source
Positional audio effects from a player attached to a node are based on that node’s position relative to the audioListener position in the scene.After playback has completed, SceneKit automatically removes the audio player from the node.
Params:
Name | Type | Attribute | Description |
player | SCNAudioPlayer | An audio player object. |
Return:
void |
public addChildNode(child: SCNNode): void source
Calling this method appends the node to the end of the childNodes array.
Params:
Name | Type | Attribute | Description |
child | SCNNode | The node to be added. |
Return:
void |
public addParticleSystem(system: SCNParticleSystem): void source
When attached to a node, a particle system’s emitter location follows that node as it moves through the scene. To instead attach a particle system to a location in the scene’s world coordinate space, use the corresponding method on SCNScene.For details on particle systems, see SCNParticleSystem.
Params:
Name | Type | Attribute | Description |
system | SCNParticleSystem | A particle system. |
Return:
void |
public animationForKey(key: string): CAAnimation source
Attempting to modify any properties of the returned object results in undefined behavior.
Params:
Name | Type | Attribute | Description |
key | string | A string identifying a previously added animation. |
public animationPlayerForKey(key: string): SCNAnimationPlayer source
Params:
Name | Type | Attribute | Description |
key | string |
public childNodeWithName(name: string): SCNNode source
SceneKit searches only those nodes in the node’s childNodes array.
Params:
Name | Type | Attribute | Description |
name | string | The name of the node to search for. |
public childNodeWithNameRecursively(name: string, recursively: boolean): SCNNode source
If the recursive parameter is true, SceneKit uses a preorder traversal to search the child node subtree—that is, the block searches a node before it searches each of the node’s children, and it searches all children of a node before searching any of that node’s sibling nodes. Otherwise, SceneKit searches only those nodes in the node’s childNodes array.
public childNodesPassingTest(predicate: function(child: SCNNode, stop: UnsafeMutablePointer<ObjCBool>): boolean): SCNNode[] source
Use this method to search for nodes using a test you specify. For example, you can search for empty nodes using a block that returns YES for nodes whose light, camera, and geometry properties are all nil.SceneKit uses a recursive preorder traversal to search the child node subtree—that is, the block searches a node before it searches each of the node’s children, and it searches all children of a node before searching any of that node’s sibling nodes.
Params:
Name | Type | Attribute | Description |
predicate | function(child: SCNNode, stop: UnsafeMutablePointer<ObjCBool>): boolean | The block to apply to the node’s child and descendant nodes .The block takes two parameters:child The child node currently being searched. stop A reference to a Boolean value. Set *stop to true in the block to abort further processing of the child node subtree.The block returns a Boolean value indicating whether to include the child node in the search results array. |
public clone(): SCNNode source
This method recursively copies the node and its child nodes. For a nonrecursive copy, use the inherited copy() method, which creates a copy of the node without any child nodes.Cloning or copying a node creates a duplicate of the node object, but not the geometries, lights, cameras, and other SceneKit objects attached to it—instead, each copied node shares references to these objects.This behavior means that you can use cloning to, for example, place the same geometry at several locations within a scene without maintaining multiple copies of the geometry and its materials. However, it also means that changes to the objects attached to one node will affect other nodes that share the same attachments. For example, to render two copies of a node using different materials, you must copy both the node and its geometry before assigning a new material.- (void)duplicateNode:(SCNNode )node withMaterial:(SCNMaterial )material { SCNNode newNode = [node clone]; newNode.geometry = [node.geometry copy]; newNode.geometry.firstMaterial = material; } Multiple copies of an SCNGeometry object efficiently share the same vertex data, so you can copy geometries without a significant performance penalty.- (void)duplicateNode:(SCNNode )node withMaterial:(SCNMaterial )material { SCNNode newNode = [node clone]; newNode.geometry = [node.geometry copy]; newNode.geometry.firstMaterial = material; }
public convertPositionFrom(position: SCNVector3, node: SCNNode): SCNVector3 source
Converts a position to the node’s coordinate space from that defined by another node.
Params:
Name | Type | Attribute | Description |
position | SCNVector3 | A position in the local coordinate space defined by the other node. |
|
node | SCNNode |
|
Another node in the same scene graph as the node, or nil to convert from the scene’s world coordinate space. |
public convertPositionTo(position: SCNVector3, node: SCNNode): SCNVector3 source
Converts a position from the node’s coordinate space to that defined by another node.
Params:
Name | Type | Attribute | Description |
position | SCNVector3 | A position in the node’s local coordinate space. |
|
node | SCNNode |
|
Another node in the same scene graph as the node, or nil to convert to the scene’s world coordinate space. |
public convertTransformFrom(transform: SCNMatrix4, node: SCNNode): SCNMatrix4 source
Converts a transformation to the node’s coordinate space from that defined by another node.
Params:
Name | Type | Attribute | Description |
transform | SCNMatrix4 | A transformation relative to the local coordinate space defined by the other node. |
|
node | SCNNode |
|
Another node in the same scene graph as the node, or nil to convert from the scene’s world coordinate space. |
public convertTransformTo(transform: SCNMatrix4, node: SCNNode): SCNMatrix4 source
Converts a transformation from the node’s coordinate space to that defined by another node.
Params:
Name | Type | Attribute | Description |
transform | SCNMatrix4 | A transformation relative to the node’s coordinate space. |
|
node | SCNNode |
|
Another node in the same scene graph as the node, or nil to convert to the scene’s world coordinate space. |
public convertVectorFrom(vector: SCNVector3, node: SCNNode): SCNVector3 source
Params:
Name | Type | Attribute | Description |
vector | SCNVector3 | ||
node | SCNNode |
|
public convertVectorTo(vector: SCNVector3, node: SCNNode): SCNVector3 source
Params:
Name | Type | Attribute | Description |
vector | SCNVector3 | ||
node | SCNNode |
|
public copy(): SCNNode source
This is a convenience method for classes that adopt the NSCopying protocol. An exception is raised if there is no implementation for copy(with:).NSObject does not itself support the NSCopying protocol. Subclasses must support the protocol and implement the copy(with:) method. A subclass version of the copy(with:) method should send the message to super first, to incorporate its implementation, unless the subclass descends directly from NSObject.
Override:
NSObject#copypublic destory() source
public enumerateChildNodes(block: function(child: SCNNode, stop: UnsafeMutablePointer<ObjCBool>): void): void source
SceneKit uses a recursive preorder traversal to process the child node subtree—that is, the block runs for a node before it runs for each of the node’s children, and it processes all children of a node before processing any of that node’s sibling nodes.
Params:
Name | Type | Attribute | Description |
block | function(child: SCNNode, stop: UnsafeMutablePointer<ObjCBool>): void | The block to apply to the node’s child and descendant nodes.The block takes two parameters:childThe child node currently being evaluated.stopA reference to a Boolean value. Set *stop to true in the block to abort further processing of the child node subtree. |
Return:
void |
public enumerateHierarchy(block: function(arg1: SCNNode, arg2: UnsafeMutablePointer<ObjCBool>): void): void source
SceneKit uses a recursive preorder traversal to process the child node subtree—that is, the block runs for a node before it runs for each of the node’s children, and it processes all children of a node before processing any of that node’s sibling nodes.This method is equivalent to the enumerateChildNodes(_:) method, but unlike that method it also runs the block to process the node itself, not just its child nodes.
Params:
Name | Type | Attribute | Description |
block | function(arg1: SCNNode, arg2: UnsafeMutablePointer<ObjCBool>): void | The block to apply to the node’s child and descendant nodes.The block takes two parameters:childThe child node currently being evaluated.stopA reference to a Boolean value. Set *stop to true in the block to abort further processing of the child node subtree. |
Return:
void |
public flattenedClone(): SCNNode source
Rendering complex node hierarchies can incur a performance cost. Each geometry and material requires a separate draw command to be sent to the GPU, and each draw command comes with a performance overhead. If you plan for a portion of your scene’s node hierarchy to remain static (with respect to itself, if not the rest of the scene), use this method to create a single node containing all elements of that node hierarchy that SceneKit can render using fewer draw commands.
public hitTestWithSegmentFromTo(pointA: SCNVector3, pointB: SCNVector3, options: Map<string, Object>): SCNHitTestResult[] source
Hit-testing is the process of finding elements of a scene located along a specified line segment in the scene’s coordinate space (or that of a particular node in the scene). For example, you can use this method to determine whether a projectile launched by a game character will hit its target.To search for the scene element corresponding to a two-dimensional point in the rendered image, use the renderer’s hitTest(_:options:) method instead.
Params:
Name | Type | Attribute | Description |
pointA | SCNVector3 | An endpoint of the line segment to search along, specified in the node’s local coordinate system. |
|
pointB | SCNVector3 | The other endpoint of the line segment to search along, specified in the node’s local coordinate system. |
|
options | Map<string, Object> |
|
A dictionary of options affecting the search. See Hit Testing Options Keys for acceptable values. |
public insertChildNodeAt(child: SCNNode, index: number): void source
Adds a node to the node’s array of children at a specified index.
Params:
Name | Type | Attribute | Description |
child | SCNNode | The node to be inserted.ImportantRaises an exception (invalidArgumentException) if child is nil. |
|
index | number | The position at which to insert the new child node.ImportantRaises an exception (rangeException) if index is greater than the number of elements in the node’s childNodes array. |
Return:
void |
public isAnimationPausedForKey(key: string): boolean source
Required. Returns a Boolean value indicating whether the animation attached to the object with the specified key is paused.
Params:
Name | Type | Attribute | Description |
key | string | A string identifying an attached animation. |
public localRotateBy(rotation: SCNQuaternion): void source
Params:
Name | Type | Attribute | Description |
rotation | SCNQuaternion |
Return:
void |
public localTranslateBy(translation: SCNVector3): void source
Params:
Name | Type | Attribute | Description |
translation | SCNVector3 |
Return:
void |
public lookAt(worldTarget: SCNVector3): void source
Params:
Name | Type | Attribute | Description |
worldTarget | SCNVector3 |
Return:
void |
public lookAtUp(worldTarget: SCNVector3, worldUp: SCNVector3, localFront: SCNVector3): void source
Params:
Name | Type | Attribute | Description |
worldTarget | SCNVector3 | ||
worldUp | SCNVector3 | ||
localFront | SCNVector3 |
Return:
void |
public pauseAnimationForKey(key: string): void source
This method has no effect if no animation is attached to the object with the specified key.
Params:
Name | Type | Attribute | Description |
key | string | A string identifying an attached animation. |
Return:
void |
public removeActionForKey(key: string): void source
If the node is currently running an action that matches the key, SceneKit removes that action from the node, skipping any remaining animation it would perform but keeping any changes already made to the node.Use this method to cancel actions you scheduled using the runAction(:forKey:) or runAction(:forKey:completionHandler:) method.
Params:
Name | Type | Attribute | Description |
key | string | A string that uniquely identifies a action. |
Return:
void |
public removeAllActions(): void source
When SceneKit removes an action from a node, it skips any remaining animation the action would perform. However, any changes the action has already made to the node’s state remain in effect.
Return:
void |
public removeAllAnimations(): void source
Required. Removes all the animations currently attached to the object.
Return:
void |
public removeAllAudioPlayers(): void source
Removes all audio players attached to the node, stopping playback.
Return:
void |
public removeAllParticleSystems(): void source
Removes any particle systems directly attached to the node.
Return:
void |
public removeAnimationForKey(key: string): void source
Required. Removes the animation attached to the object with the specified key.
Params:
Name | Type | Attribute | Description |
key | string | A string identifying an attached animation to remove. |
Return:
void |
public removeAnimationForKeyBlendOutDuration(key: string, duration: number): void source
Return:
void |
public removeAnimationForKeyFadeOutDuration(key: string, duration: number): void source
Use this method to create smooth transitions between the effects of multiple animations. For example, the geometry loaded from a scene file for a game character may have associated animations for player actions such as walking and jumping. When the player lands from a jump, you remove the jump animation so the character continues walking. If you use the removeAnimation(forKey:) method to remove the jump animation, SceneKit abruptly switches from the current frame of the jump animation to the current frame of the walk animation. If you use the removeAnimation(forKey:fadeOutDuration:) method instead, SceneKit plays both animations at once during that duration and interpolates vertex positions from one animation to the other, creating a smooth transition.
Return:
void |
public removeAudioPlayer(player: SCNAudioPlayer): void source
This method has no effect if the player parameter does not reference an audio player directly attached to the node.
Params:
Name | Type | Attribute | Description |
player | SCNAudioPlayer | An audio player attached to the node. |
Return:
void |
public removeFromParentNode(): void source
Removing nodes from the node hierarchy serves two purposes. Nodes own their contents (child nodes or attached lights, geometries, and other objects), so deallocating unneeded nodes can reduce memory usage. Additionally, SceneKit does more work at rendering time with a large, complex node hierarchy, so removing nodes whose contents you don’t need to display can improve rendering performance.
Return:
void |
public removeParticleSystem(system: SCNParticleSystem): void source
This method has no effect if the system parameter does not reference a particle system directly attached to the node.
Params:
Name | Type | Attribute | Description |
system | SCNParticleSystem | A particle system. |
Return:
void |
public replaceChildNodeWith(oldChild: SCNNode, newChild: SCNNode): void source
If both the child and child2 nodes are children of the node, calling this method swaps their positions in the array. Note that removing a node from the node hierarchy may result in it being deallocated.Calling this method results in undefined behavior if the child parameter does not refer to a child of this node.
Return:
void |
public resumeAnimationForKey(key: string): void source
This method has no effect if no animation is attached to the object with the specified key or if the specified animation is not currently paused.
Params:
Name | Type | Attribute | Description |
key | string | A string identifying an attached animation. |
Return:
void |
public rotateByAroundTarget(worldRotation: SCNQuaternion, worldTarget: SCNVector3): void source
Params:
Name | Type | Attribute | Description |
worldRotation | SCNQuaternion | ||
worldTarget | SCNVector3 |
Return:
void |
public runAction(action: SCNAction): void source
SceneKit begins running a newly added action when it prepares to render the next frame.
Params:
Name | Type | Attribute | Description |
action | SCNAction | The action to be performed. |
Return:
void |
public runActionCompletionHandler(action: SCNAction, block: function(): void): void source
The new action is processed the next time SceneKit prepares to render a frame.SceneKit calls your block after the action’s duration is complete. For example, in a game you could use this method to show a Game Over message after performing a fade-out action on a node that displays a player character.
Return:
void |
public runActionForKey(action: SCNAction, key: string): void source
This method is identical to runAction(_:), but the action is stored and identified so that you can retrieve or cancel it later. If an action using the same key is already running, SceneKit removes it before adding the new action.
Return:
void |
public runActionForKeyCompletionHandler(action: SCNAction, key: string, block: function(): void): void source
This method is identical to runAction(_:completionHandler:), but the action is stored and identified so that you can retrieve or cancel it later. If an action using the same key is already running, SceneKit removes it before adding the new action.SceneKit calls your block after the action’s duration is complete. For example, you can use this method with a wait action to execute some code after a timed delay. If during the delay period you need to prevent the code from running, use the removeAction(forKey:) method to cancel it.
Return:
void |
public setValueForKey(value: *, key: *) source
If key identifies a to-one relationship, relate the object specified by value to the receiver, unrelating the previously related object if there was one. Given a collection object and a key that identifies a to-many relationship, relate the objects contained in the collection to the receiver, unrelating previously related objects if there were any. The search pattern that setValue:forKey: uses is described in Accessor Search Patterns in Key-Value Coding Programming Guide.In a reference-counted environment, if the instance variable is accessed directly, value is retained.
Override:
NSObject#setValueForKeyParams:
Name | Type | Attribute | Description |
value | * | ||
key | * |
public setValueForKeyPath(value: *, keyPath: *) source
The default implementation of this method gets the destination object for each relationship using value(forKey:), and sends the final object a setValue(_:forKey:) message.Special ConsiderationsWhen using this method, and the destination object does not implement an accessor for the value, the default behavior is for that object to retain value rather than copy or assign value.
Override:
NSObject#setValueForKeyPathParams:
Name | Type | Attribute | Description |
value | * | ||
keyPath | * |
public setWorldTransform(worldTransform: SCNMatrix4): void source
Params:
Name | Type | Attribute | Description |
worldTransform | SCNMatrix4 |
Return:
void |
public valueForKeyPath(keyPath: *, usePresentation: boolean): * source
The default implementation gets the destination object for each relationship using value(forKey:) and returns the result of a value(forKey:) message to the final object.
Override:
NSObject#valueForKeyPathParams:
Name | Type | Attribute | Description |
keyPath | * | ||
usePresentation | boolean |
|
Return:
* |
public valueForUndefinedKey(key: string): Object source
Subclasses can override this method to return an alternate value for undefined keys. The default implementation raises an NSUndefinedKeyException.
Override:
NSObject#valueForUndefinedKeyParams:
Name | Type | Attribute | Description |
key | string | A string that is not equal to the name of any of the receiver's properties. |