<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIWindowSceneDragInteraction",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIWindowSceneDragInteraction"
  },
  "title" : "UIWindowSceneDragInteraction"
}
-->

# UIWindowSceneDragInteraction

An interaction you add to a view that enables pan gestures to change the containing window scene’s position.

```
@MainActor class UIWindowSceneDragInteraction
```

## Overview

Create and add this interaction to a view that you want to drag to adjust the position of your app’s window. [`UINavigationBar`](/documentation/UIKit/UINavigationBar) handles this automatically, so you only need to add this interaction to views in other parts of your window that you want to be draggable.

```objc
UIWindowSceneDragInteraction *windowDragInteraction = [[UIWindowSceneDragInteraction alloc] init];
[self.draggableView addInteraction:windowDragInteraction];
```

## Topics

### Preventing gesture conflicts

[`gestureForFailureRelationships`](/documentation/UIKit/UIWindowSceneDragInteraction/gestureForFailureRelationships)

The gesture that the drag interaction adds to the view hierarchy.



---

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)