views:

20

answers:

1

Hi, if I have a protocal defined, then it always generate a lot of warnings when compile.

like

@property (retain) id <SomeProc> value

then in the code: [value class]; ... [value release] the compiler always complain it "may not have class or release defined".

Is there a way to fix this?

+1  A: 

Yes:

@protocol SomeProc <NSObject>
…
@end

This way your protocol will also contain all the methods required by the NSObject protocol.

zoul