【发布时间】:2011-12-21 14:38:13
【问题描述】:
我有一个应用程序在设备上的调试模式下运行良好。我将应用程序发送到 App Store,它运行良好,但 iPhone 3G 除外。
我的测试(调试)设备是 iPhone 3G,它在调试时工作得很好,但是当我下载该应用程序并通过 App Store 安装它时,它在我的 iPhone 上也不能工作。
我在代码中有一些 NSLog,并认为这可能是问题所在,但即使在删除 NSLog 之后,iPhone 3G 上也会发生同样的事情。
问题是我正在使用以下代码:
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
mouseSwiped = YES;
UITouch *touch = [touches anyObject];
CGPoint currentPoint = [touch locationInView:self.view];
currentPoint.y -= 20;
UIGraphicsBeginImageContext(self.view.frame.size);
[drawImage.image drawInRect:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);
CGContextSetLineWidth(UIGraphicsGetCurrentContext(), 5.0);
CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), 1.0, 0.0, 0.0, 1.0);
CGContextBeginPath(UIGraphicsGetCurrentContext());
CGContextMoveToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y);
CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), currentPoint.x, currentPoint.y);
CGContextStrokePath(UIGraphicsGetCurrentContext());
drawImage.image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
lastPoint = currentPoint;
}
在 iPhone 3G 上,这并不正确。它只是制作水平线。这在其他设备上运行良好。
这里可能出了什么问题?
【问题讨论】:
标签: iphone ios xcode cocoa-touch app-store