{"id":15648434,"url":"https://github.com/daniel-beard/dbkvoblock","last_synced_at":"2025-09-07T02:06:00.973Z","repository":{"id":8290046,"uuid":"9829270","full_name":"daniel-beard/DBKVOBlock","owner":"daniel-beard","description":"Use blocks for KVO instead of the clunky built in way. Auto unregisters deallocated objects.","archived":false,"fork":false,"pushed_at":"2015-03-13T19:37:22.000Z","size":260,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T23:41:20.109Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daniel-beard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-03T05:18:24.000Z","updated_at":"2015-03-13T19:37:22.000Z","dependencies_parsed_at":"2022-08-07T01:15:27.238Z","dependency_job_id":null,"html_url":"https://github.com/daniel-beard/DBKVOBlock","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daniel-beard/DBKVOBlock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel-beard%2FDBKVOBlock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel-beard%2FDBKVOBlock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel-beard%2FDBKVOBlock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel-beard%2FDBKVOBlock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daniel-beard","download_url":"https://codeload.github.com/daniel-beard/DBKVOBlock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel-beard%2FDBKVOBlock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273986629,"owners_count":25202708,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T12:24:51.560Z","updated_at":"2025-09-07T02:06:00.945Z","avatar_url":"https://github.com/daniel-beard.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"DBKVOBlock\n==========\n[![Build Status](https://travis-ci.org/daniel-beard/DBKVOBlock.png?branch=master)](https://travis-ci.org/daniel-beard/DBKVOBlock)\n\nNote: This code was experimental at best, use this as a learning experience, but PLEASE do not use this in production.\n\n* DBKVOBlock is an attempt to simplify the use of Key Value Observing by using blocks instead of the clunky built in way.\n* DBKVOBlock also automatically unregisters KVO notifications for objects that are deallocated.\n* You can set multiple actions for a single keyPath.\n\n### Registering for KVO notifications\n\nThere are several ways that you can use the class, the first is using the `sharedManager`:\n\n    id objectToObserve; // assume initialized\n    [[DBKVOBlock sharedManager] observeObject: objectToObserve withKeyPath: @\"textValue\" withAction:^{\n        NSLog(@\"Textvalue changed!\");\n    }];\n\nThe other way is a category on `NSObject` that forwards relevant calls to the sharedManager:\n\n    id objectToObserve; // assume initialized\n    [objectToObserve observeKeyPath: @\"textValue\" withAction: ^{\n        NSLog(@\"Textvalue changed!\");\n    }];\n\n### Unregistering notifications\n\nYou can set the object that is being observed to `nil` and DBKVOBlock will automatically unregister notifications.\n\nOr you can use one of the following `sharedManager` methods:\n\n    //Remove all notifications for an object\n    [[DBKVOBlock sharedManager] removeObserverForObject: objectToObserve];\n\n    //Remove all notifications that match a keyPath on an object\n    [[DBKVOBlock sharedManager] removeObserverForObject: objectToObserve withKeyPath: keyPath];\n    \n    //Remove all notifications for all objects and all keyPaths\n    [[DBKVOBlock sharedManager] removeAllObservers];\n    \n### Including in your project\n\n* Clone the repository locally\n* Copy the contents of the `DBKVOBlock` into your project and add to your target\n* You should now have the following files in your project:\n * `DBKVOBlock.h` + `DBKVOBlock.m`\n * `DBKVOObject.h` + `DBKVOObject.m`\n * `NSObject+DBKVOBlock.h` + `NSObject+DBKVOBlock.m`\n* Import the `DBKVOBlock.h` file in the class you want to use it. `#import \"DBKVOBlock.h\"` \n\n### Licence + Notes\n\nCopyright (C) 2013 Daniel Beard http://danielbeard.wordpress.com\n \nDistributed under [MIT License](http://opensource.org/licenses/mit-license.php)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel-beard%2Fdbkvoblock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniel-beard%2Fdbkvoblock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel-beard%2Fdbkvoblock/lists"}