performSelectorInBackground with multiple params

后端 未结 4 1905
孤街浪徒
孤街浪徒 2020-12-14 09:56

How can I call a method with multiple params like below with performSelectorInBackground?

Sample method:

-(void) reloadPage:(NSInteger)pageIndex fir         


        
4条回答
  •  佛祖请我去吃肉
    2020-12-14 10:37

    Well, I have used this:

    [self performSelectorInBackground:@selector(reloadPage:)
                           withObject:[NSArray arrayWithObjects:pageIndex,firstCase,nil] ];
    

    for this:

    - (void) reloadPage: (NSArray *) args {
        NSString *pageIndex = [args objectAtIndex:0];    
        NSString *firstCase = [args objectAtIndex:1];    
    }
    

提交回复
热议问题