/ Published in: iPhone
Expand |
Embed | Plain Text
- (void)viewWillAppear:(BOOL)animated { self.tabBarController.tabBar.hidden = NO; //video stuff CGRect myVideoRect = CGRectMake(0.0f, 145.0f, 320.0f, 160.0f); moviePlayerController = [[MPMoviePlayerController alloc] initWithContentURL:movieUrl]; [[moviePlayerController view] setFrame:myVideoRect]; moviePlayerController.controlStyle = MPMovieControlStyleNone; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playbackFinished:) name:MPMoviePlayerPlaybackDidFinishNotification object:moviePlayerController]; [self.view addSubview:moviePlayerController.view]; [moviePlayerController play]; } - (void)viewWillDisappear:(BOOL)animated { if (moviePlayerController != nil) { [moviePlayerController release]; moviePlayerController = nil; } } if (moviePlayerController != nil) { thriveVC = [[ThriveViewController alloc] init]; thriveVC.hidesBottomBarWhenPushed = NO; [[self navigationController] pushViewController:thriveVC animated:YES]; } } - (void)backPressed:(UIButton*)button { [self.navigationController popViewControllerAnimated:YES]; } - (void)skipPressed:(UIButton*)button { thriveVC = [[ThriveViewController alloc] init]; thriveVC.hidesBottomBarWhenPushed = NO; [[self navigationController] pushViewController:thriveVC animated:YES]; }
You need to login to post a comment.
