Morgan Evans Media Morgan Evans Media - 2 years ago 76
iOS Question

How to make a video open and play on button click in iOS

I'm very new to iOS and have very little experience.
Please could someone show me how to code my app so a video open and play on button click? I canĀ“t find out how to do this anywhere. Any help would be much appreciated.

Answer Source

I think this code will help you to open Movie player.

NSURL *movieURL = [NSURL URLWithString:@""];
movieController = [[MPMoviePlayerViewController alloc] initWithContentURL:movieURL];
[self presentMoviePlayerViewControllerAnimated:movieController];
[movieController.moviePlayer play];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download