-
Notifications
You must be signed in to change notification settings - Fork 476
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. added the VPN status check method; solved the status issue in the …
…VPN case 2. refactor the demo
- Loading branch information
1 parent
87e8573
commit fc628c4
Showing
6 changed files
with
438 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// | ||
// NSObject+SimpleKVO.h | ||
// ExMobi | ||
// | ||
// Created by achen on 16/7/1. | ||
// Simply modified from NSObject+YYAddForKVO. | ||
// | ||
// 一个从YYAddForKVO修改而来的极致简化的KVO封装(从API参数设计到调用方式) | ||
// | ||
// 注意:这里监听的是值的变化,其值确实改变后才会触发回调; | ||
// 其行为和原始KVO以及YYAddForKVO都不同。 | ||
// 后两者的行为是只要被赋值就会触发(由KVO的实现原理决定的,而simpleKVO作了特别处理), | ||
// 使其更易用于某些业务场景的需求实现。 | ||
// | ||
// 单元测试覆盖率100/100。 | ||
// | ||
// Thanks to ibireme! | ||
// Original project: | ||
// YYKit (author ibireme): <https://github.com/ibireme/YYKit> | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
#define ENABLE_SWIZZ_IN_SIMPLEKVO | ||
|
||
@interface NSObject (SimpleKVO) | ||
|
||
- (void)addKVOForPath:(NSString*)path withBlock:(void (^)(id newValue))block; | ||
|
||
- (void)removeKVOForPath:(NSString *)path; | ||
|
||
- (void)removeAllKVOs; | ||
|
||
@end |
Oops, something went wrong.
4 comments
on commit fc628c4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When will this feature be available via cocopods as new version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, today I will release a new version. Haha. hope you like it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DTown 1.3.0 released.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dustturtle Thx a lot :)
如果使用路由器ss代理导致路由icmp受限的情况如何判断