I get a warning that the class method '-modelLayer' was not found for the CALayer class in the following code. According to the CALayer class reference, the modelLayer method exists. This code runs correctly, so it confirms that the implementation exists at run time. I suppose I just need to add casting to get rid of the warning, but I'm not sure what to do.
How can I resolve the warning?
I am using Xcode 4.0 Build 4A278b.
Code:
CALayer * layer = (CALayer *)(coinView.layer); CGRect newCoinFrame = [[layer modelLayer] frame];
Attention: CoinsToSlotViewControllerTest.m: 138: warning: found found method '-modelLayer
CALayer ref: http://developer.apple.com/library/mac/#documentation/GraphicsImaging/Reference/CALayer_class/Introduction/Introduction.html
source share