How to detect touches on MPMoviePlayerController window and still having the standard playback cont
Posted
by gkedmi
on Stack Overflow
See other posts from Stack Overflow
or by gkedmi
Published on 2010-03-22T12:18:14Z
Indexed on
2010/03/22
12:21 UTC
Read the original article
Hit count: 642
Hello I have the MPMoviePlayerController set up to play a movie.I want to detect a touch on the movie for bringing up few buttons.I used the code :
// The movie's window is the one that is active
UIWindow* moviePlayerWindow = [[UIApplication sharedApplication] keyWindow];
// Now we create an invisible control with the same size as the window
UIControl* overlay = [[[UIControl alloc] initWithFrame:moviePlayerWindow.frame]autorelease];
// We want to get notified whenever the overlay control is touched
[overlay addTarget:self action:@selector(movieWindowTouched:) forControlEvents:UIControlEventTouchDown];
// Add the overlay to the window's subviews
[moviePlayerWindow addSubview:overlay];
but then the play back controllers doesn't appear , I guess because the player window doesn't get the touch.how can I keep the player controllers and still detects touches? thanks
© Stack Overflow or respective owner