-2

如何在我的选择器上发送我的 NSDictionary 作为参数,以及如何读取它?

NSDictionary * dict = [[NSDictionary alloc]initWithObjectsAndKeys:@"idOferta",@"test", nil];                
NSThread * viewsThread = [[NSThread alloc] initWithTarget:self selector:@selector(updateViewStatistic:) object:dict];
[viewsThread start];

- (void)updateViewStatistic:(NSThread *)mt {
      NSLog(@"dictionary %@",dict); 
}
4

1 回答 1

0

updateViewStatistic:将您的方法更改为以下内容:

- (void)updateViewStatistic:(NSDictionary *)dictionary
{
    NSLog(@"Dictionary: %@", dictionary);
}
于 2013-08-21T20:27:12.060 回答