Ios 解除UIImageView时上下文0x0无效

Ios 解除UIImageView时上下文0x0无效,ios,cocoa-touch,uiimageview,Ios,Cocoa Touch,Uiimageview,当我试图用 - (void)handleGesture:(UIGestureRecognizer *)gestureRecognizer { CGPoint p = [gestureRecognizer locationInView:self.view]; if (CGRectContainsPoint(_tutorial.frame, p)) { _tutorial.hidden = YES; _transButton.enabled = YE

当我试图用

- (void)handleGesture:(UIGestureRecognizer *)gestureRecognizer {
    CGPoint p = [gestureRecognizer locationInView:self.view];
    if (CGRectContainsPoint(_tutorial.frame, p)) {
        _tutorial.hidden = YES;

        _transButton.enabled = YES;
        _transButtonEng.enabled = YES;
        _infoButton.enabled = YES;
        _textfield.enabled = YES;
    }
    else {
        NSLog(@"HOW IS THIS EVEN POSSIBLE?!?!?"); //The CGRect is the whole screen
    }
}
我收到以下错误消息:

MacBook-Pro.local应用程序名称[97086]:CGContextSetFillColorWithColor:无效上下文0x0。这是一个严重的错误。此应用程序或其使用的库正在使用无效的上下文,从而导致系统稳定性和可靠性的整体降级。此通知是出于礼貌:请解决此问题。这将成为即将进行的更新中的致命错误

它还会重复相同的消息,并将
CGContextSetFillColorWithColor:
替换为:

CGContextSetStrokeColorWithColor:
CGContextSaveGState:
CGContextSetFlatness:
CGContextAddPath:
CGContextDrawPath:
CGContextRestoreGState:
CGContextSaveGState:
CGContextSetFlatness:
CGContextAddPath:
CGContextDrawPath:
CGContextRestoreGState:
CGContextSetFillColorWithColor:
CGContextSetStrokeColorWithColor:
CGContextSetFillColorWithColor:
CGContextSetStrokeColorWithColor:
CGContextGetBlendMode:
CGContextSetBlendMode:
CGContextFillRects:
CGContextSetBlendMode:
CGContextSetFillColorWithColor:
CGContextSetStrokeColorWithColor:
CGContextGetBlendMode:
CGContextSetBlendMode:
CGContextFillRects:
CGContextSetBlendMode:
CGContextSetFillColorWithColor:
CGContextSetStrokeColorWithColor:
CGContextGetBlendMode:
CGContextSetBlendMode:
CGContextFillRects:
CGContextSetBlendMode:
我使用的是最新版本的Xcode 5和iOS 7.0.3


如何修复这些错误

隐藏
\u教程
图像视图后,应移除手势识别器(通过UIGestureRecgonizer),这样您就不会调用“
cRectContainsPoint
”在隐藏视图上,谁知道帧值是什么。

隐藏
\u教程
图像视图后,应移除手势识别器(通过UIGestureRecgonizer,这样您就不会调用“
cRectContainsPoint
”在隐藏视图上,谁知道帧值是什么。

在复制到问题的代码中,还应该包括调用“
CGContextSetFillColorWithColor
”的方法/函数@MichaelDautermann我不在任何地方调用这些;我使用接口生成器我不知道它是否相关,但有一些已知的iOS 7错误会导致这种行为:我已经看到了这些,但我想知道是否有一个修复方法可以解决UIGestureRecognitor/UIImageView在您复制到问题中的代码中导致错误的问题,您应该还包括调用“
CGContextSetFillColorWithColor
”的方法/函数@MichaelDautermann我不会在任何地方调用这些错误;我使用接口生成器我不知道是否相关,但有一些已知的iOS 7错误会导致这种行为:我已经看到了这些错误,但我想知道是否有一种修复方法可以解决UIGestureRecognitor/UIImageView何时导致错误的问题。请提供一个示例?我在阅读mo时遇到了很多困难st类型的API文档。你能提供一个例子吗?我在阅读大多数类型的API文档时遇到很多困难。