iphone - nskvopendingnotification error in objective-c -


i have following problem

during abstraction have encapsulated class in objective c allows me change rectangles size , position on underlying image. use class in situations each different. in 1 need ensure minimum , maximum size in other rect must square. observe value set user , check against rules using objective-c methods:

[rectdrawer addobserver:self forkeypath:@"value" options:nskeyvalueobservingoptionnew context:nil]; - (void)observevalueforkeypath:(nsstring *)keypath ofobject:(id)object change:(nsdictionary *)change context:(void *)context 

in method check constraints. when want correct invalid value , write comes problem "exc_bad_access" exception

i tried following avoid exception not help

[rectdrawer removeobserver:self forkeypath:@"value"]; rectdrawer.value = _value; [rectdrawer addobserver:self forkeypath:@"value" options:nskeyvalueobservingoptionnew context:nil]; 

is there possible solution this


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -