How to get rid of the 'undeclared selector' warning

前端 未结 12 2162
伪装坚强ぢ
伪装坚强ぢ 2020-12-12 10:53

I want to use a selector on an NSObject instance without the need for an implemented protocol. For example, there\'s a category method that should set an error prop

12条回答
  •  [愿得一人]
    2020-12-12 11:31

    While the correct answer likely lies in informing Xcode through imports or registering the selector that such a selector exists, in my case I was missing a semi-colon. Make sure before you "fix" the error that perhaps, the error is correct and your code isn't. I found the error in Apple's MVCNetworking sample, for instance.

提交回复
热议问题