2016-09-20 69 views
0

我想呈現RPBroadcastActivityViewController,但失敗。示例代碼只是呈現黑色視圖。如何使用ReplayKit的類RPBroadcastActivityViewController?

- (IBAction)displayServiceViewController:(id)sender { 
    RPBroadcastActivityViewController *rpBroadcastActivityViewController = [[RPBroadcastActivityViewController alloc] init]; 
    [self presentViewController:rpBroadcastActivityViewController animated:YES completion:nil]; 

} 

我希望它產生以下影響:

expected

+0

已經解決: – Yofer

回答

0
- (IBAction)displayServiceViewController:(id)sender { 
    [RPBroadcastActivityViewController loadBroadcastActivityViewControllerWithHandler:^(RPBroadcastActivityViewController * _Nullable broadcastActivityViewController, NSError * _Nullable error) { 
     broadcastActivityViewController.delegate = self; 
     [self presentViewController:broadcastActivityViewController animated:YES completion:nil]; 
    }]; 

}