Skip to content

Instantly share code, notes, and snippets.

@SunXiaoShan
Created December 14, 2018 07:57
Show Gist options
  • Save SunXiaoShan/5f346be20d607bf1a55b17e98662eac8 to your computer and use it in GitHub Desktop.
Save SunXiaoShan/5f346be20d607bf1a55b17e98662eac8 to your computer and use it in GitHub Desktop.
func runBroadcast() {
// Step 1
RPBroadcastActivityViewController.load { broadcastAVC, error in
// Step 2
guard error == nil else {
print("Cannot load Broadcast Activity View Controller.")
return
}
// Step 3
if let broadcastAVC = broadcastAVC {
broadcastAVC.delegate = self
self.present(broadcastAVC, animated: true, completion: nil)
}
}
}
func stopBroadcast() {
controller.finishBroadcast { error in
if error == nil {
print("Broadcast ended")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment