开发者

NSInvocationOperation with return value (BOOL)

开发者 https://www.devze.com 2023-02-18 18:55 出处:网络
hi i have these invocation operation: NSInvocationOperation *operation = [[NSInvocationOperation alloc]

hi i have these invocation operation:

NSInvocationOperation *operation = [[NSInvocationOperation alloc] 
             initWithTarget:ndParser selector:@开发者_开发知识库selector (parseUrl:)
             object:[NSString stringWithFormat:@"http://URL%@",var]];

my method:

- (BOOL) parseUrl:(NSString *)URL;

should throw back bool....

how can i catch this value?

regards


You can get the result like this:

BOOL result;
[[operation result] getValue:&result];

From the docs here.

0

精彩评论

暂无评论...
验证码 换一张
取 消