Creates an action that changes the alpha value of the node to 1
.
SDKs
- iOS 7.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
Framework
- Sprite
Kit
Declaration
class func fadeIn(withDuration duration: Time Interval) -> SKAction
Parameters
sec
The duration of the animation.
Return Value
A new action object.
Discussion
When the action executes, the node’s alpha
property animates from its current value to 1
.
This action is reversible; the reverse is created as if the following code is executed:
let action = SKAction.fadeOut(withDuration: sec)