Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to add an Subview to a Fullscreen MPMoviePlayer
    primarykey
    data
    text
    <p>I want to add a Logo (<code>UIImageView</code>) to a fullscreen MPMoviePlayerController. </p> <p>It works fine when the <code>MPMoviePlayerController</code> is not in fullscreen Mode. When i switch to full screen all added views on the <code>MPMoviePlayerController</code> removed(hidden).</p> <p>Here is my code:</p> <pre><code>- (void)setupMPMoviePlayer{ [self.moviePlayer.view removeFromSuperview]; [self removeNotifications]; self.moviePlayer = nil; self.moviePlayer = [[MPMoviePlayerController alloc] init]; [self addNotifications]; [self.moviePlayer.view setFrame:self.view.bounds]; self.moviePlayer.view.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; self.moviePlayer.fullscreen = NO; [self.view addSubview:self.moviePlayer.view]; if ([self.moviePlayer respondsToSelector:@selector(setAllowsAirPlay:)]) [self.moviePlayer setAllowsAirPlay:YES]; [self.moviePlayer setContentURL:[NSURL URLWithString:urlString]]; [self.moviePlayer setFullscreen:YES animated:YES]; [self addLogoViewAtView:self.moviePlayer.view]; } - (void)addLogoViewAtView:(UIView *)view{ UIView *theView = [view viewWithTag:101]; if (theView.superview) { [theView removeFromSuperview]; } UIImageView *logoView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"logo_weiss.png"]]; logoView.tag = 101; logoView.frame = CGRectMake( logoView.image.size.width - 100.0, 100.0, logoView.image.size.width, logoView.image.size.height); logoView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleBottomMargin; [view addSubview:logoView]; [view bringSubviewToFront:logoView]; } </code></pre> <p>Now my question is there an alternate way to add an subview to <code>MPMoviePlayerController</code>?</p> <p>I can add the logo to the application's window but this ist not so clean.</p> <p>Anyone have any idea on how I could do this?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload