---
title: "presentController(_:)"
framework: watchkit
role: symbol
role_heading: Instance Method
path: "watchkit/wkinterfacecontroller/presentcontroller(_:)"
---

# presentController(_:)

Presents a page-based interface modally.

## Declaration

```swift
@MainActor @nonobjc @preconcurrency final func presentController(_ namesAndContexts: [(name: String, context: AnyObject)])
```

## Parameters

- `namesAndContexts`: An array of tuples. Each tuple must contain the following named elements:

## Discussion

Discussion After calling this method, WatchKit loads and initializes the new interface controllers and animates them into position on top of the current interface controller. A modal interface slides up from the bottom of the screen and completely cover the previous interface. WatchKit displays the first interface controller in the names array initially. The user can navigate to the other interfaces by swiping horizontally. The title of the modal interface is set to the string Cancel unless the presented interface controller explicitly changes it using the setTitle(_:) method. Tapping the title dismisses the interface automatically. To dismiss the interface programmatically, call the dismiss() method. Always call this method from your WatchKit extension’s main thread.

## See Also

### Deprecated symbols

- [Text Response Key](watchkit/text-response-key.md)
- [addMenuItem(withImageNamed:title:action:)](watchkit/wkinterfacecontroller/addmenuitem(withimagenamed:title:action:).md)
- [addMenuItem(with:title:action:)](watchkit/wkinterfacecontroller/addmenuitem(with:title:action:)-6pb4t.md)
- [addMenuItem(with:title:action:)](watchkit/wkinterfacecontroller/addmenuitem(with:title:action:)-1q2zj.md)
- [beginGlanceUpdates()](watchkit/wkinterfacecontroller/beginglanceupdates().md)
- [clearAllMenuItems()](watchkit/wkinterfacecontroller/clearallmenuitems().md)
- [endGlanceUpdates()](watchkit/wkinterfacecontroller/endglanceupdates().md)
- [handleUserActivity(_:)](watchkit/wkinterfacecontroller/handleuseractivity(_:).md)
- [reloadRootControllers(withNames:contexts:)](watchkit/wkinterfacecontroller/reloadrootcontrollers(withnames:contexts:).md)
- [updateUserActivity(_:userInfo:webpageURL:)](watchkit/wkinterfacecontroller/updateuseractivity(_:userinfo:webpageurl:).md)
- [WKMenuItemIcon](watchkit/wkmenuitemicon.md)
