I created a simple view based application using Xcode and I tried using CGPDFDocumentGetMediaBox method as below:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
// Set the view controller as the window's root view controller and display.
CGPDFDocumentRef r;
CGRect cg = CGPDFDocumentGetMediaBox(r, 0);
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
However, I get a compile error saying that the method is unavailable:
/Users/s/Documents/test/Classes/testAppDelegate.m:27:0 /Users/s/Documents/test/Classes/testAppDelegate.m:27: error: 'CGPDFDocumentGetMediaBox' is unavailable (declared at /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGPDFDocument.h:117)
I can see from the Apple documents- Deprecated in Mac OS X version 10.3 and later. But doesn't deprecated mean that the methods should no be used but are still available? I can see the declaration in the header file: CGPDFDocument.h
Mac version: 10.6.8 Xcode version: 3.2.6 iOS SDK: 4.3
Am I missing something here?