Latest 0.1.1
Homepage https://github.com/zekunyan/TTGNotificationGuard
License MIT
Platforms ios 6.0, requires ARC
Dependencies TTGDeallocTaskHelper
Frameworks UIKit, CoreFoundation
Authors

CI Status
Version
License
Platform

What

Auto remove the observer from NSNotificationCenter after the oberser dealloc, base on TTGDeallocTaskHelper.

Requirements

iOS 6 and later.

Installation

TTGNotificationGuard is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "TTGNotificationGuard"

Usage

  1. TTGNotificationGuard is default off, so you must turn it on first.
    
    #import "NSNotificationCenter+TTGNotificationGuard.h"
  • (BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary )launchOptions {
    // Enable the TTGNotificationGuard
    [NSNotificationCenter ttg_setTTGNotificationGuardEnable:YES];
    return YES;
    }

  1. 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

TTGNotificationGuard is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "TTGNotificationGuard",
    "version": "0.1.1",
    "summary": "Auto remove the observer from NSNotificationCenter after the oberser dealloc.",
    "description": "Auto remove the observer from NSNotificationCenter after the oberser dealloc, base on TTGDeallocTaskHelper.",
    "homepage": "https://github.com/zekunyan/TTGNotificationGuard",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "zekunyan": "[email protected]"
    },
    "source": {
        "git": "https://github.com/zekunyan/TTGNotificationGuard.git",
        "tag": "0.1.1"
    },
    "social_media_url": "http://tutuge.me",
    "platforms": {
        "ios": "6.0"
    },
    "requires_arc": true,
    "source_files": "TTGNotificationGuard/Classes/**",
    "public_header_files": "TTGNotificationGuard/Classes/*.h",
    "frameworks": [
        "UIKit",
        "CoreFoundation"
    ],
    "dependencies": {
        "TTGDeallocTaskHelper": []
    }
}

Pin It on Pinterest

Share This