KVO Blocks In Action

See: toxicsoftware.com/kvoblocks/


All updates to the UI items (the layers in the central "map" view, the colour of the "star" when the picker is on screen, etc) are based on KVO blocks.

joey oppo and Anbarasu Sundaram faved this
  • Jonathan Wight PRO 6y

    This is the code that updates the star colour based on the user picking a colour (all CoreData/Cocoa Bindings/CoreAnimation/KVO Blocks):

    void *theUpdateObjectBlock = ^(NSString *keyPath, CGameObjectLayer *self, NSDictionary *change, id userInfo)
    for (CALayer *theLayer in self.sublayers)
    [theShaderLayer setNeedsDisplay];
    [theGameObjectLayer addKVOBlock:theUpdateObjectBlock forKeyPath:@"gameObject.color" options:0 identifier:@"KVO_IDENTIFIER_XX"];
  • mralexgray 3y

    is the source code to this "CStar" posted anywhere?
2 faves
Uploaded on August 16, 2009
This photo is in 1 album

Additional info

  • Viewing this photo Public
  • Safety level of this photo Safe
  • S Search
    Photo navigation
    < > Thumbnail navigation
    Z Zoom
    B Back to context