2012-04-30 3 views
1

로그에서 경고가 나타납니다 : "경고 - 개체 ID를 가져올 수 없습니다". 나는 그물을 수색했지만 그것에 대한 언급은 찾을 수 없다. 그것은 화면 이미지를 가져 와서 시뮬레이터 사진 라이브러리에 추가 할 때 일어납니다.Objective-C 경고 - 개체 ID를 가져올 수 없습니다 - 무슨 의미입니까?

사람은 무슨 뜻인지 알고 ..

이미지

확인을 저장, 그래서 해가 수행되지 않습니다,하지만 난 나 자신을 위해 생성하지 않는 메시지를 좋아하지 않아?

-(void)captureToPhotoAlbum { 
    //NSLog(@"%s", __FUNCTION__); 


    // Get image to save 
    CGImageRef screen = UIGetScreenImage(); 
    UIImage *img = [UIImage imageWithCGImage:screen]; 

    //Test for Retina display: 
    if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)] && [[UIScreen mainScreen] scale] == 2.0) { 
     // Retina 
     // Image cropping This is the size of the saved image. 
     CGImageRef imageRef = CGImageCreateWithImageInRect([img CGImage], CGRectMake(0.0f, 230.0f, 1536.0f, 1640.0f)); 
     UIImage *img2Save = [UIImage imageWithCGImage:imageRef]; 
     CGImageRelease(imageRef); 
     // Request to save the image to camera roll 
     UIImageWriteToSavedPhotosAlbum(img2Save, self, nil, nil); 

    } else { 
     //Non Retina 
     // Image cropping This is the size of the saved image. 
     CGImageRef imageRef = CGImageCreateWithImageInRect([img CGImage], CGRectMake(0.0f, 115.0f, 768.0f, 820.0f)); 
     UIImage *img2Save = [UIImage imageWithCGImage:imageRef]; 
     CGImageRelease(imageRef); 
     // Request to save the image to camera roll 
     UIImageWriteToSavedPhotosAlbum(img2Save, self, nil, nil); 
    } 

} 

콘솔 출력 : :이를 작성하는거야

Apr 30 20:29:52 Davids-MacPro.local AppName[25159] <Warning>: Unable to get object ID. 
Apr 30 20:29:52 Davids-MacPro.local AppName[25159] <Warning>: Unable to get object ID. 
Apr 30 20:29:52 Davids-MacPro.local AppName[25159] <Warning>: Unable to get object ID. 
Apr 30 20:29:52 Davids-MacPro.local AppName[25159] <Warning>: Unable to get object ID. 
+0

경고 메시지 또는 경고 스크린 샷을 게시 할 수 있습니다. – WrightsCS

+0

[20885] : 개체 ID를 가져올 수 없습니다. (이것은 12 번 정도 발생합니다 ... –

+1

이 경고가 나타나는 곳의 스크린 샷 – WrightsCS

답변

1

다음은 화면 이미지를 캡처 코드입니다. 경고는 시뮬레이터에서 실행 중일 때만 나타납니다. 장치에서 실행할 때 경고가 없습니다.

관련 문제