-(void)rotateView:(id)sender {
CGAffineTransform rotateTransform = CGAffineTransformRotate(CGAffineTransformIdentity, M_PI);
[sender setTransform:rotateTransform];//the error is shown here
}
I am getting this caution error that shows up and says Multiple methods named -setTransform: found. It only shows up when I have #import AVFoundation/AVFoundation.h in my header file. Any suggestions? Thanks
Cast
senderto the proper class type and the warning should go away:As
senderis passed torotateView:as typeidXcode cannot know what actual class type it is and by that which method to call.Edit: Coincidentally just today Matt Gallagher of Cocoa With Love fame published an article about all kinds of issues caused by calling an ambiguous method on
idin Objective-C.