It looks like you're new here. If you want to get involved, click one of these buttons!
//
// TurnerViewController.m
// LYWAM Tour
//
// Created by Alan Raff on 9/13/12.
//
//
#import "TurnerViewController.h"
#import <MediaPlayer/MediaPlayer.h>
@interface TurnerViewController ()
@end
@implementation TurnerViewController
@synthesize biaPlayer16;
-(void)biaVideo16
{
NSURL *url11 = [NSURL fileURLWithPath:[[NSBundle mainBundle]
pathForResource:@"Turner" ofType:@"mp4"]];
biaPlayer16 = [[MPMoviePlayerController alloc]
initWithContentURL:url11];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayBackDidFinish:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:nil];
biaPlayer16.controlStyle = MPMovieControlStyleDefault;
biaPlayer16.shouldAutoplay = YES;
[self.view addSubview:biaPlayer16.view];
[biaPlayer16 setFullscreen:YES animated:YES];
}
-(void) moviePlayBackDidFinish:(NSNotification *)aNotification{
[biaPlayer16.view removeFromSuperview];
biaPlayer16 = nil;
}
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
@end
But every other time I press the "watch" button the app crashes, it doesnt do this on the simulator, only on the actual device. Any ideas?
Replies
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like Awesome