---
title: SFSafariExtensionViewController
framework: safariservices
role: symbol
role_heading: Class
path: safariservices/sfsafariextensionviewcontroller
---

# SFSafariExtensionViewController

The view controller for a popover associated with your app extension.

## Declaration

```swift
class SFSafariExtensionViewController
```

## Mentioned in

Adjusting settings for a toolbar item

## Overview

Overview If your toolbar item has a popover, your popover view controller should be a subclass of this class. As with other macOS development, typically you want to add your own outlets and actions to the view controller, and provide an XIB file for its user interface. Your view controller’s contents must use Auto Layout.

## Topics

### Instance Methods

- [dismissPopover()](safariservices/sfsafariextensionviewcontroller/dismisspopover().md)

## Relationships

### Inherits From

- [NSViewController](appkit/nsviewcontroller.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSEditor](appkit/nseditor.md)
- [NSExtensionRequestHandling](foundation/nsextensionrequesthandling.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSeguePerforming](appkit/nssegueperforming.md)
- [NSStandardKeyBindingResponding](appkit/nsstandardkeybindingresponding.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [NSUserActivityRestoring](appkit/nsuseractivityrestoring.md)
- [NSUserInterfaceItemIdentification](appkit/nsuserinterfaceitemidentification.md)

## See Also

### Contextual menu and toolbar items

- [Using contextual menu and toolbar item keys](safariservices/using-contextual-menu-and-toolbar-item-keys.md)
- [Adjusting settings for a toolbar item](safariservices/adjusting-settings-for-a-toolbar-item.md)
- [Adjusting settings for contextual menu items](safariservices/adjusting-settings-for-contextual-menu-items.md)
- [SFSafariToolbarItem](safariservices/sfsafaritoolbaritem.md)
