ios - Key-value observation: Can I observe for changes on ALL properties? -


whenever property on object changed or updated want change variable (nonce variable). nonce time-based. everytime property updated nonce gets updated current time.

is there way automatically listen key changes on object? or have manually maintain keyvalue observers each property separately?

many thanks

did take @ obj-c runtime functions? see here in docs. example, gives list of properties in class lender. (btw: i'm not @ mac, straight out of docs):

@interface lender : nsobject {     float alone; } @property float alone; @end 

you can list of properties using:

id lenderclass = objc_getclass("lender"); unsigned int outcount; objc_property_t *properties = class_copypropertylist(lenderclass, &outcount); 

you can name of property:

const char *property_getname(objc_property_t property) 

if pipe names addobserver:forkeypath:options:context should golden.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -