-2

How can I send my NSDictionary on my selector, as a parameter, and how I can read it?

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); 
}
Lucas Eduardo
  • 11,525
  • 5
  • 44
  • 49
darkman
  • 993
  • 3
  • 13
  • 31
  • It seems that you didn't read the documentation, or at least you didn't read it carefully enough... –  Aug 21 '13 at 20:25

1 Answers1

0

Change your updateViewStatistic: method to something like this:

- (void)updateViewStatistic:(NSDictionary *)dictionary
{
    NSLog(@"Dictionary: %@", dictionary);
}
Eric
  • 2,077
  • 17
  • 16
  • The exact same answer is posted to the duplicate, as it has already been stated - no need for reproducing it. –  Aug 21 '13 at 20:28