receiver type *** for instance message is a forward declaration

后端 未结 9 1035
心在旅途
心在旅途 2021-01-30 01:19

In my iOS5 app, I have NSObject States class, and trying to init it:

states = [states init];

here is init

9条回答
  •  悲哀的现实
    2021-01-30 01:45

    Make sure the prototype for your unit method is in the .h file.

    Because you're calling the method higher in the file than you're defining it, you get this message. Alternatively, you could rearrange your methods, so that callers are lower in the file than the methods they call.

提交回复
热议问题