Created
June 14, 2019 11:07
-
-
Save chaitanyaSoni96/eba4e52f7f585c3c915914ce40dea992 to your computer and use it in GitHub Desktop.
ObjC completion method
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
-(void)method:(NSString *)str withCompletion:(void (^)(NSArray* arr))callback{ | |
NSMutableArray *a = [NSArray new]; | |
[a addObject:str]; | |
callback(a); | |
} | |
[YourClassName method:@"" withCompletion:^(NSArray *arr) { | |
NSLog(arr.count) | |
//Your Code here | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment