KVO Blocks In Action

Newer Older

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 get2anbu added this video to their favorites.

  1. schwatoo 69 months ago | reply

    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"];

  2. mralexgray 36 months ago | reply

    is the source code to this "CStar" posted anywhere?

keyboard shortcuts: previous photo next photo L view in light box F favorite < scroll film strip left > scroll film strip right ? show all shortcuts