Anyone have any ideas? When I try to synthesize a property I have declared in the .h file its not letting me synthesize it. Any ideas? Thanks!
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
This can happen when you attempt to synthesize a property outside of the scope of your class' implementation.
Incorrect:
@synthesize yourProperty;
@implementation YourClass
@end
Correct:
@implementation YourClass
@synthesize yourProperty;
@end
回答2:
It often happen when you use #import
,and does not on the top of file.