When I embed a youtube video with a UIWebView, I get a 'Done' button when the video is brought up. The 'Done' button does not perform the way i want it to, how do I create my own 'Done' button?
Asked
Active
Viewed 178 times
2 Answers
1
You could overlay a view containing a button and anything else you want on top of the UIWebView and then connect things up as you see fit. You have to be careful about resizing on rotation and keep in mind that changes could be made to the you tube video presentation which are out of your control.

jbat100
- 16,757
- 4
- 45
- 70
-
Are we talking about the same thing? I create an embedded youtube vid with UIWebView first, and after that's tapped, the video loads with a 'done' button up top. That 'done' button does not behave the way it should, and I see no way to change it. – MaikelS Oct 25 '11 at 08:19
-
What I'm saying is that I don't think you can change what it does, so I was suggesting overlaying another button on top, I know it's not a great solution but I don't see any other. – jbat100 Oct 25 '11 at 08:22
-
Yeah that was my plan, but I dont know how to overlay a button on the modal screen of the youtube video. – MaikelS Oct 25 '11 at 08:28
-
I didn't realize you had no control over the pushing of the modal view, it makes things trickier. You could overlay the view in the window. In your appDelegate finish launching, you have something like [window addSubview:viewController.view];. Just add another subview on top. Take a look at this post http://stackoverflow.com/questions/1779511/play-youtube-videos-with-mpmovieplayercontroller-instead-of-uiwebview. You could also register for MPMoviePlayerPlaybackDidFinishNotification to add to default behaviour, if not customize it. – jbat100 Oct 25 '11 at 08:41
1
Solution to original problem: Use iframe embedding instead of flash embedding!

MaikelS
- 1,309
- 4
- 16
- 33