objective c - Synthesized Methods for Class Extension Unavailable -


ok, i'm confused. have class employee, declare several properties for, of course, synthesize , work fine. in implementation class, extend class so:

@interface employee ()     @property (nonatomic) unsigned int employeeid; @end 

which think allow me following in main.m:

employee emp = [[employee alloc] init]; //use other property accessor methods... [emp setemployeeid:123456];  //do other stuff... 

but compiler chokes on use of setemployeeid following error "no visible interface 'employee' declares selector 'setemployeeid.'

can tell me why shouldn't able use extension same way i'd use other properties? help!!!

because employeeid property 'private' if have declared using continuation category in .m file of class. means compiler won't 'see' definition during compilation - hence array.

technically, still access @ runtime using kvc, should decide if property should public or private.

if you're testing / messing around can redeclare property in local category make visible during compilation.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -