Skip to content

Instantly share code, notes, and snippets.

@ramamilaneh
Created April 2, 2017 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ramamilaneh/195749fef07a1f399ce54e1d274b163d to your computer and use it in GitHub Desktop.
Save ramamilaneh/195749fef07a1f399ce54e1d274b163d to your computer and use it in GitHub Desktop.
- (void)viewDidLoad {
[super viewDidLoad];
[self.view setBackgroundColor:[UIColor whiteColor]];
_videoBackgroundView = [[VideoView alloc] initWithFrame:self.view.frame];
[self.view addSubview:_videoBackgroundView];
[self setupViews];
}
-(void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.videoBackgroundView playVideo];
}
-(void)viewDidDisappear:(BOOL)animated {
[super viewDidDisappear:animated];
[self.videoBackgroundView pauseVideo];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment