Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6875379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T04:18:55+00:00 2026-05-27T04:18:55+00:00

I am using a MPMoviePlayer to display a video. I go into full screen

  • 0

I am using a MPMoviePlayer to display a video. I go into full screen and when the done button is clicked I want it to remove of the entire movie player from my view.

Right Now When I click The Done Button It Dismiss The MPMoviePlayer But It change The size Of My UIView Height. Is there any solution To remove MPMoviePlayer without affecting my View Size.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T04:18:56+00:00Added an answer on May 27, 2026 at 4:18 am

    Create a videoPlayer view controller (MPMoviePlayerViewController subclass) and add it to your root view controller.

    videoPlayerViewController = [[VideoViewController alloc] initWithContentURL:[NSURL fileURLWithPath:resourcePath]];
    [rootViewController presentMoviePlayerViewControllerAnimated:videoPlayerViewController];
    videoPlayer.controlStyle = MPMovieControlStyleFullscreen;
    

    then add notifications:

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(stopVideo:) name:MPMoviePlayerPlaybackDidFinishNotification object:[videoPlayerViewController moviePlayer]];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(stopVideo:) name:MPMoviePlayerDidExitFullscreenNotification object:[videoPlayerViewController moviePlayer]];                        
    

    then your method that gets called when the notification is received.

    - (void) stopVideo:(NSNotification*) aNotification {
      [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerPlaybackDidFinishNotification object:[videoPlayerViewController moviePlayer]];
      [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerDidExitFullscreenNotification object:[videoPlayerViewController moviePlayer]];
      MPMoviePlayerController *player = [aNotification object];
      [player stop];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using mpmovieplayer in my application.I have a button for playing movie witch
I want to implement the movie player for that,i'm using MPMoviePlayerViewController. My code is,
I want to rotate my movie player view explicitly (not using Autorotation delegate) .
I'm using the MPMoviePlayer to play a movie. I want to be able to
I'm trying to play two videos continuously using MPMoviePlayer. I let the second video
I have a simple view with a button. When clicked it pops up movie
I'm currently writing a custom video player using AVPlayer. The video plays fine and
im using a videoplayer - and realized that the done button seems to be
I'm using a MPMoviePlayerController in my iPhone app to display some short video clips
Using a populated Table Type as the source for a TSQL-Merge. I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.