<!--
{
  "availability" : [
    "iOS: 10.0.0 - 27.0.0",
    "iPadOS: 10.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "tvOS: 10.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "ReplayKit",
  "identifier" : "/documentation/ReplayKit/RPBroadcastActivityViewController/load(handler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "ReplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)RPBroadcastActivityViewController(cm)loadBroadcastActivityViewControllerWithHandler:"
  },
  "title" : "load(handler:)"
}
-->

# load(handler:)

Loads a broadcast activity view controller.

```
class func load(handler: @escaping (RPBroadcastActivityViewController?, (any Error)?) -> Void)
```

## Parameters

`handler`

A block that is called after the view controller is loaded.

- `broadcastActivityViewController`: The `RPBroadcastActivityViewController` to be presented.
- `error`: If an error occurred, this parameter holds an object that explains the error. Otherwise, the value of this parameter is `nil`. See [`RPRecordingErrorCode`](/documentation/ReplayKit/RPRecordingErrorCode) for a list of error codes specific to ReplayKit.

## Discussion

Present the view controller using <doc://com.apple.documentation/documentation/UIKit/UIViewController/present(_:animated:completion:)>. Dismiss the view controller when the delegate’s [`broadcastActivityViewController(_:didFinishWith:error:)`](/documentation/ReplayKit/RPBroadcastActivityViewControllerDelegate/broadcastActivityViewController(_:didFinishWith:error:)) method is called.

> Note:
> On the iPad, the default presentation style for view controllers is a popover. For an instance of `RPBroadcastActivityViewController` to present properly on iPad, insure the popover presentation controller’s <doc://com.apple.documentation/documentation/UIKit/UIPopoverPresentationController/sourceRect> and <doc://com.apple.documentation/documentation/UIKit/UIPopoverPresentationController/sourceView> are configured.

---

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)