---
title: "safariViewController(_:activityItemsFor:title:)"
framework: safariservices
role: symbol
role_heading: Instance Method
path: "safariservices/sfsafariviewcontrollerdelegate/safariviewcontroller(_:activityitemsfor:title:)"
---

# safariViewController(_:activityItemsFor:title:)

Tells the delegate that the user tapped an Action button.

## Declaration

```swift
optional func safariViewController(_ controller: SFSafariViewController, activityItemsFor URL: URL, title: String?) -> [UIActivity]
```

## Parameters

- `controller`: The view controller.
- `URL`: The URL of the web page that was active when the Action button was tapped.
- `title`: The title of the web page.

## Return Value

Return Value An array of application-specific services you have chosen to include in the UIActivityViewController object.

## Discussion

Discussion The view controller calls this method when the view is about to show an activity view controller. Your delegate can provide unique, application-specific services (such as a social media service) to be included with the system-provided sharing services. See UIActivity.

## See Also

### Working with the View Controller

- [safariViewController(_:didCompleteInitialLoad:)](safariservices/sfsafariviewcontrollerdelegate/safariviewcontroller(_:didcompleteinitialload:).md)
- [safariViewControllerDidFinish(_:)](safariservices/sfsafariviewcontrollerdelegate/safariviewcontrollerdidfinish(_:).md)
- [safariViewController(_:excludedActivityTypesFor:title:)](safariservices/sfsafariviewcontrollerdelegate/safariviewcontroller(_:excludedactivitytypesfor:title:).md)
