首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >摆脱/修复断点3.1 & 4.1 Xcode iOS 6

摆脱/修复断点3.1 & 4.1 Xcode iOS 6
EN

Stack Overflow用户
提问于 2012-10-31 08:21:42
回答 1查看 2.3K关注 0票数 0

我如何修复下面的代码,以便在模拟器中运行应用程序时不会发生断点。当我保存并运行应用程序时,它显示没有问题,但在运行进程后立即停止,并显示断点3.1 4.1错误。

代码语言:javascript
复制
#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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-10-31 08:44:49

如果您设置了断点,或者存在运行时错误,就会发生断点。如果您没有在那里设置断点,那么这是一个运行时错误。

鉴于您提到了3.1 4.1错误,这表明存在运行时错误。您应该仔细查看断点所在的行,看看是否有什么问题。另外,发布这个断点的位置也会帮助其他人帮助你。

由于不知道断点在哪里,我猜测您的电影文件名不正确(请记住iOS区分大小写),或者movie1.MP4没有添加到项目中。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13149519

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档