iphone - Multiple Methods named '-setTransform:' found -


-(void)rotateview:(id)sender { cgaffinetransform rotatetransform = cgaffinetransformrotate(cgaffinetransformidentity, m_pi); [sender settransform:rotatetransform];//the error shown here } 

i getting caution error shows , says multiple methods named -settransform: found. shows when have #import avfoundation/avfoundation.h in header file. suggestions? thanks

cast sender proper class type , warning should go away:

[(yourclasshere *)sender settransform:rotatetransform]; 

as sender passed rotateview: type id xcode cannot know actual class type , method call.

edit: coincidentally today matt gallagher of cocoa love fame published article kinds of issues caused calling ambiguous method on id in objective-c.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -