How to create full-screen MPMovieController view on top of UIPopoverController?

I successfully put the MPMoviePlayerController in the UIPopoverController by doing:

NSString *filenameString = [NSString stringWithString:[[helpVideosArray objectAtIndex:tagNumber] objectForKey:VIDEO_FILE_NAME]]; HelpVideoPopover *helpVideoPopover = [[HelpVideoPopover alloc] initWithVideoFilename:filenameString PreviewFrameView:self]; currentPopover = [[[[UIPopoverController alloc] initWithContentViewController:helpVideoPopover] retain] autorelease]; [currentPopover setPopoverContentSize:CGSizeMake(320, 240)]; [currentPopover presentPopoverFromRect:((UIButton*)sender).frame inView:previewView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; currentPopover.passthroughViews = [NSArray arrayWithObject:((HelpVideoPopover*)[currentPopover contentViewController]).movieController.view]; 

The problem is that when the user wants to view the full screen video (and I allow it), the pop-up view is on top of the full screen video. So my question is that I have to do this one more. Or maybe when I show a popover, I just use an empty one and overlay a video player from the parent controller on it? I really would like to save the movie player logic in the popover view controller.

+8
ipad fullscreen mpmovieplayercontroller uipopovercontroller
source share
1 answer

Without knowing the details of your application, I would suggest that you can do this in several ways.

You can open the video in full screen - this will cover a popover. If you show a full-screen video in a detailed view behind a popover, you can do something simple by simply hiding a popover after showing a full-screen video.

0
source share

Source: https://habr.com/ru/post/650063/


All Articles