- block syntax
- Add
pod 'MSDeallocCallBack'
to your Podfile. - Run
pod install
- Add all files under
MSDeallocCallback
to your project
- iOS 5.0 and greater
- ARC
Objective-C:
#import "NSObject+MSDeallocCallBack.h"
@property(nonatomic,assign)SecondViewController* sc;
WEAKSELF
[self.sc deallocCallBack:^{
weakSelf.sc = nil;
NSLog(@"xxxx%@",weakSelf.sc);
}];
MSDeallocCallback is available under the MIT license. See the LICENSE file for more info.