Xcode 4.3 / 4.4媒体播放器SIGABRT ERROR

时间:2012-07-26 10:58:43

标签: ios media-player mpmovieplayercontroller xcode4.3

我一直在使用这个简单的代码在Xcode中播放电影,但是看到这个新的更新已经出来我总是遇到SIGBRT错误。有人能让我知道我做错了吗?

我的。文件:

#import <UIKit/UIKit.h>
#import <MediaPlayer/Mediaplayer.h>

@interface ViewController : UIViewController {
MPMoviePlayerViewController *playvideo;
}

- (IBAction) jump: (id) sender;

@end

微米。文件:

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (IBAction) jump: (id) sender
{
NSString *path = [[NSBundle mainBundle]
                  pathForResource:@"jump" ofType:@"mp4"];
playvideo = [[MPMoviePlayerViewController alloc]
             initWithContentURL:[NSURL fileURLWithPath:path]];
[self presentMoviePlayerViewControllerAnimated:playvideo];
}

- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}

- (void)viewDidUnload
{
[super viewDidUnload];
// Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return UIDeviceOrientationIsLandscape(interfaceOrientation);
}

@end

在视图上我有按钮,这是动作的链接。我也在使用故事板。 如果您有任何想法,请告诉我。

谢谢你。 罗伯特

0 个答案:

没有答案