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

  • Home
  • SEARCH
  • 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 3500974
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:48:04+00:00 2026-05-18T12:48:04+00:00

I have an iPad app that has 4 buttons on the left side that

  • 0

I have an iPad app that has 4 buttons on the left side that corresponds to 4 different video clips. When a user taps the video they want to see, it appears on the right side. I am wanting it to appear to be loading (as if it were streaming over the internet). I added the UIActivityIndicator to the center of the black video frame and have a thread that pauses for 3 seconds. However, the player containing the previous video does not disappear. It just freezes on the last frame of the previous video for 3 seconds (hiding the activity indicator) and then the new video appears.

Any ideas on how to make the player temporarily be hidden? Thanks for any help. Here is my code:

-(IBAction) videoButton1{
   [player stop];
   [player release];

   [self.activityIndicator startAnimating];

   NSString *url = [[NSBundle mainBundle] pathForResource:@"video1" ofType:@"mov"];
   [self setupVideoPlayer:url];
}

-(void) setupVideoPlayer: (NSString *) url{
   player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:url)];
   player.view.frame = CGRectMake(487, 205, 478, 320);

   [self.view addSubview:player.view];

   [NSThread sleepForTimeInterval:3.0];
   self.activityIndicator stopAnimating];

   [player play];
}
  • 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-18T12:48:04+00:00Added an answer on May 18, 2026 at 12:48 pm

    You can set the frame of your player to a View that you can make in IB or programmatically instead of doing a CGRectMake every time.

    self.player.view.frame =
    self.viewForMovie.bounds;

    self.player.view.autoresizingMask =
    UIViewAutoresizingFlexibleWidth |
    UIViewAutoresizingFlexibleHeight;

    Then in your "videoButton1" you can set the alpha of the View to 0

    viewForMovie.alpha = 0;

    And in your "setupVideoPlayer" you can change the alpha back to 1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an iPad app that has 10 view controllers that swipe left
I have a universal iOS app with a custom view that has three buttons,
Hi i have created app for ipad , it has an video files in
I have an iPad app that receives data using UDP sockets. And it has
I have an iPad app that has linear navigation with a Navigation Controller. I
I have an iPad app that has draggable UIViews contained in a larger parent
I have an iPad app that contains a webview. The webview's page has a
I have an iPad app that has an MKMapView embedded in a UINavigationController which
Building an iPad app. I have a button on my main view that I
I have an ipad app that is loading data remotely into core data, I

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.