如何修复以下编码,以便在模拟器中运行应用程序时不会出现断点。一旦我保存并运行该应用程序,它就说没有问题,但在运行过程之后它立即停止并说断点 3.1 4.1 错误。
#import "XYZViewController.h"
#import <MediaPlayer/MediaPlayer.h>
@interface XYZViewController ()
@end
@implementation XYZViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
NSString *movFile = [[NSBundle mainBundle]pathForResource:@"movie1" ofType:@"MP4"];
movPlayer = [[MPMoviePlayerController alloc] initWithContentURL: [NSURL fileURLWithPath:movFile]];
movPlayer.allowsAirPlay=YES;
[movPlayer.view setFrame:CGRectMake(0, 0, 320, 480)];
[self.view addSubview:movPlayer.view];
[movPlayer play];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end