<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKTransition/push(with:duration:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKTransition(cm)pushWithDirection:duration:"
  },
  "title" : "push(with:duration:)"
}
-->

# push(with:duration:)

Creates a transition where the new scene moves in, pushing the old scene out of the view.

```
class func push(with direction: SKTransitionDirection, duration sec: TimeInterval) -> SKTransition
```

## Parameters

`direction`

The direction of the push. Possible values are described in [`SKTransitionDirection`](/documentation/SpriteKit/SKTransitionDirection).

`sec`

The duration of the transition.

## Return Value

A new transition.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)