내 애플리케이션에서 ZBar SDK를 사용하고 있습니다. 정상적으로 실행할 수 있습니다. 제가 조사를 좀 해봤 I,iOS 6에서 사용되지 않는 메소드에 대한 경고를 제거 할 수 없습니다.
- (IBAction) scanButtonTapped
{
// ADD: present a barcode reader that scans from the camera feed
ZBarReaderViewController *reader = [ZBarReaderViewController new];
reader.readerDelegate = self;
reader.supportedOrientationsMask = ZBarOrientationMaskAll;
ZBarImageScanner *scanner = reader.scanner;
// TODO: (optional) additional reader configuration here
// EXAMPLE: disable rarely used I2/5 to improve performance
[scanner setSymbology: ZBAR_I25
config: ZBAR_CFG_ENABLE
to: 0];
// present and release the controller
//line below is deprecated
[self presentModalViewController:reader animated:YES];
//line below when I uncomment causes an error
//[self presentModalViewController: reader animated: YES completion: nil];
NSLog(@"TBD: scan barcode here...");
}
을 이제 다음과 같이 나는이 줄을 사용
"presentModalViewController:animated" is deprecated. First deprecated in iOS 6.
내 전체 방법은 다음과 같습니다 그러나, 나는 알아낼 수 없습니다 다음과 같은 경고를 얻고있다 발견 아이폰 OS 6에 사용할 수있는 업데이트 방법입니다 :
[self presentModalViewController: reader animated: YES completion: nil];
그러나, 나는이되지 않는 한 대신 내 코드에서이 줄을 사용할 때, 지금 경고 대신 다음과 같은 오류가 점점 오전 :
"no visible @interface for "ViewController" declares the selector 'presentModalViewController: animated: completion: '.
솔직히이 오류를 수정하는 방법을 모르므로 알고 싶습니다. 내 문제가 내가 경고를 고치려고하는 방식입니까? 나는 정직하게 모르고 어떤 통찰력을 평가할 것입니다.
FYI에서 여기에서 ZBar SDK를 다운로드했습니다. http://zbar.sourceforge.net/iphone/sdkdoc/
이고 ZBar SDK의 실제 폴더에는 헤더 파일 만 포함되어 있습니다.
미리 답변 해 주신 모든 분께 감사드립니다.
개체를 해제하고 있는지 확인하십시오. ARC 라이브러리가 아닙니다. – Michael