I downloaded the code for Apple's ZoomingPDFViewer sample application, but I am unable to compile this application. It's showing a warning for this line
NSU开发者_开发问答RL *pdfURL = [[NSBundle mainBundle] URLForResource:@"TestPage.pdf" withExtension:nil];
NSBundle may not respond to URLForResource:withExtension
I build using the iPhone OS 3.2.1 SDK. Why is it giving me this warning?
URLForResource:withExtension:
method is available starting SDK 4.0. In older systems you need to use other methods, e.g. obtain path to the resource file using pathForResource:ofType:
method first and then convert it to NSURL
精彩评论