In my iPad App I have a modal view (UIViewController
with modal presentation style UIModalPresentationPageSheet
)
Inside the view is a UIWebView with a HTML page and an embedded YouTube-Video. If I start the video and close the view, the video doesn't stop. The audio continues and you can see a small "play icon" next to the "battery icon" in the status bar.
How can I stop the video?
Do integrate following code to sort out the problem.
-(void)viewWillDisappear:(BOOL)animated
{
[webView loadHTMLString:nil baseURL:nil];
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With