objective-c – 线程1:EXC_BREAKPOINT(代码= EXC_i386_BPT,子代码= 0x0)错误

前端之家收集整理的这篇文章主要介绍了objective-c – 线程1:EXC_BREAKPOINT(代码= EXC_i386_BPT,子代码= 0x0)错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个iPad应用程序,但即使没有错误或警告,它也会在启动时崩溃,输出不会输出除“(lldb”“以外的任何内容,它标记一个指针.

这是造成事件崩溃的形象.

这里是代码

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
   /* UIImage *myImage = [UIImage imageNamed:@"de_dust2.png"];
    myImageView = [[UIImageView alloc] initWithImage:myImage];

    myScrollView.contentSize = CGSizeMake(myImageView.frame.size.width,myImageView.frame.size.height);
    myScrollView.maximumZoomScale = 4.0;
    myScrollView.minimumZoomScale = 0.75;
    myScrollView.clipsToBounds = YES;
    myScrollView.delegate = self;
   // [myScrollView addSubview:myImageView];*/

    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    self.viewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
    self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    [self.viewController setRed:1];
     [self.viewController setGreen:0];
    [self.viewController setBlue:0];
    [self.viewController setAlpha:1];
    [self.viewController checkRotation];
    return YES;
}

我现在也注意到错误是在[self.window makeKeyAndVisible]中给出的.线.

解决方法

你的代码看起来很好,崩溃可能是由一些异常引发的,解析窗口的XIB文件

看看Interface Builder中的Window,并尝试临时删除对View Controller中存在的任何IBOutlet的所有引用…

原文链接:https://www.f2er.com/c/113351.html

猜你在找的C&C++相关文章