Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zekunyan/ttgkvoguard
Auto remove KVO observer from object after it dealloc.
https://github.com/zekunyan/ttgkvoguard
guard ios kvo objective-c
Last synced: about 1 month ago
JSON representation
Auto remove KVO observer from object after it dealloc.
- Host: GitHub
- URL: https://github.com/zekunyan/ttgkvoguard
- Owner: zekunyan
- License: mit
- Created: 2016-08-01T16:17:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-08-02T17:18:48.000Z (over 8 years ago)
- Last Synced: 2024-10-18T16:19:21.490Z (3 months ago)
- Topics: guard, ios, kvo, objective-c
- Language: Objective-C
- Size: 24.4 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TTGKVOGuard
[![CI Status](http://img.shields.io/travis/zekunyan/TTGKVOGuard.svg?style=flat)](https://travis-ci.org/zekunyan/TTGKVOGuard)
[![Version](https://img.shields.io/cocoapods/v/TTGKVOGuard.svg?style=flat)](http://cocoapods.org/pods/TTGKVOGuard)
[![License](https://img.shields.io/cocoapods/l/TTGKVOGuard.svg?style=flat)](http://cocoapods.org/pods/TTGKVOGuard)
[![Platform](https://img.shields.io/cocoapods/p/TTGKVOGuard.svg?style=flat)](http://cocoapods.org/pods/TTGKVOGuard)## What
Auto remove KVO observer from object after the object or the observer dealloc, base on [TTGDeallocTaskHelper](https://github.com/zekunyan/TTGDeallocTaskHelper).
## Requirements
iOS 6 and later.
## Installation
TTGKVOGuard is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "TTGKVOGuard"
```## Usage
1. TTGKVOGuard is default off, so you must turn it on first.
```
#import- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Enable the TTGKVOGuard
[NSObject ttg_setTTGKVOGuardEnable:YES];
return YES;
}
```2. No more need to do. Just start coding as usual :)
## Example
To run the example project, clone the repo, and run `pod install` from the Example directory first.
## Author
zekunyan, [email protected]
## License
TTGKVOGuard is available under the MIT license. See the LICENSE file for more info.