---
title: disconnect()
framework: gamecontroller
role: symbol
role_heading: Instance Method
path: gamecontroller/gcvirtualcontroller/disconnect()
---

# disconnect()

Disconnects the virtual controller from the device and removes it from the screen.

## Declaration

```swift
func disconnect()
```

## Discussion

Discussion After you invoke this method, the framework stops calling input handlers that you set for the elements.

## See Also

### Connecting and displaying virtual controllers

- [connect(replyHandler:)](gamecontroller/gcvirtualcontroller/connect(replyhandler:).md)
