ムービーを再生するように MPMoviePlayerController をセットアップしました。いくつかのボタンを表示するために、ムービーのタッチを検出したいと思います。次のコードを使用しました。
// 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];
しかし、再生コントローラーが表示されないのは、プレーヤー ウィンドウがタッチされないためだと思います。プレーヤー コントローラーを保持したまま、タッチを検出するにはどうすればよいですか? ありがとう