iOS:Fix warnning method
This commit is contained in:
parent
f0f660f709
commit
36975d1377
@ -26,18 +26,18 @@
|
|||||||
#define DoricCache PINCache
|
#define DoricCache PINCache
|
||||||
|
|
||||||
@interface PINCache (Doric)
|
@interface PINCache (Doric)
|
||||||
- (void)setObject:(NSString *)value forKey:(NSString *)key withBlock:(void (^)())block;
|
- (void)setObject:(NSString *)value forKey:(NSString *)key withBlock:(void (^)(void))block;
|
||||||
|
|
||||||
- (void)objectForKey:(NSString *)key withBlock:(void (^)(NSString *, id <NSCoding>))block;
|
- (void)objectForKey:(NSString *)key withBlock:(void (^)(NSString *, id <NSCoding>))block;
|
||||||
|
|
||||||
- (void)removeObjectForKey:(NSString *)key withBlock:(void (^)(NSString *))block;
|
- (void)removeObjectForKey:(NSString *)key withBlock:(void (^)(NSString *))block;
|
||||||
|
|
||||||
- (void)removeAllObjectsWithBlock:(void (^)())pFunction;
|
- (void)removeAllObjectsWithBlock:(void (^)(void))pFunction;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation PINCache (Doric)
|
@implementation PINCache (Doric)
|
||||||
|
|
||||||
- (void)setObject:(NSString *)value forKey:(NSString *)key withBlock:(void (^)())block {
|
- (void)setObject:(NSString *)value forKey:(NSString *)key withBlock:(void (^)(void))block {
|
||||||
[self setObjectAsync:value forKey:key completion:^(id <PINCaching> cache, NSString *key, id object) {
|
[self setObjectAsync:value forKey:key completion:^(id <PINCaching> cache, NSString *key, id object) {
|
||||||
block();
|
block();
|
||||||
}];
|
}];
|
||||||
@ -55,7 +55,7 @@ - (void)removeObjectForKey:(NSString *)key withBlock:(void (^)(NSString *))block
|
|||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)removeAllObjectsWithBlock:(void (^)())block {
|
- (void)removeAllObjectsWithBlock:(void (^)(void))block {
|
||||||
[self removeAllObjectsAsync:^(id <PINCaching> cache) {
|
[self removeAllObjectsAsync:^(id <PINCaching> cache) {
|
||||||
block();
|
block();
|
||||||
}];
|
}];
|
||||||
@ -195,4 +195,4 @@ - (void)clear:(NSDictionary *)argument withPromise:(DoricPromise *)promise {
|
|||||||
[promise resolve:nil];
|
[promise resolve:nil];
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
Reference in New Issue
Block a user