0
"때때로"아래의 코드는 장치에서 실행할 때 충돌 (EXC_BAD_ACCESS)을 발생시킵니다. 시뮬레이터에 절대로 없어.drawRect의 EXC_BAD_ACCESS
모달 뷰 컨트롤러를 테이블보기 컨트롤러 위에 오버레이하여 재현합니다. 일반적으로 모달 뷰 컨트롤러가 닫힐 때 발생합니다.
왜 그런가?
CGContextRef context = UIGraphicsGetCurrentContext();
//set the background of the cell
[self.backgroundColor set];
CGContextFillRect(context, rect);
// get cached image
UIImage *image = [[ImageUtil sharedInstance] getImageByRouteType:route.type];
CGSize imageSize = CGSizeMake(IMAGE_WIDTH, IMAGE_WIDTH);
// DEBUGGER STOPS ON THIS NEXT LINE, image object is fine though
[image drawInRect:CGRectMake(0, 0, imageSize.width, imageSize.height)];
[...]
감사
UIImages CGImage 속성을 공개하지 못할 수 있습니다. 어디서나 CGImage 속성에 액세스하고 있습니까? – tonklon
답변을 주셔서 감사 합니다만, 아니요, 어디서나 CGImage 속성에 액세스하지 않고 있습니다 ... – nicktmro