How to hide a RPSystemBroadcastPickerView?

I am currently using a Broadcast Extension to enable screen sharing on my iOS app.In order to do this, I am using an instance of the class RPSystemBroadcastPickerView which handles the user interaction in order to start/stop broadcast. There are circumstances where I have to force stopping broadcasting programmatically, which I am able to do by calling in my extension:

      [self finishBroadcastWithError:(nil)];

However, in this case, if the PickerView was still visible, it remains visible and:

  1. disappears only upon user interaction (clicking outside the buttons of the PickeView)
  2. being in the foreground, it hides the dialog that notifies the user that broadcasting has been forced to stop

I've tried to hide the RPSystemBroadcastPickerView by hiding the view and all of its subviews but without success.

Is there any way to hide (or destroy) programmatically the RPSystemBroadcastPickerView without needing the user tapping on the window or any other user interaction?

0 ответов

Другие вопросы по тегам