Created
December 14, 2018 07:57
-
-
Save SunXiaoShan/5f346be20d607bf1a55b17e98662eac8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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