Search code examples
iphonemethodsreturn-valuensinvocation

NSInvocationOperation with return value (BOOL)


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


Solution

  • You can get the result like this:

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

    From the docs here.