as i told here i am using NSNotificationCenter
.
on class A (observer) on the init method i have got :
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(getSensorsData:) name:@"HotSpotTouched" object:nil];
on classB i have got :
//FILL NSDICTIONARY WITH DATA
[dict setObject:@"SPOT1" forKey:[array objectAtIndex:0]];
[dict setObject:@"SPOT2" forKey:[array objectAtIndex:1]];
[dict setObject:@"SPOT3" forKey:[array objectAtIndex:2]];
[dict setObject:@"SPOT4" forKey:[array objectAtIndex:3]];
[dict setObject:@"SPOT5" forKey:[array objectAtIndex:4]];
[[NSNotificationCenter defaultCenter] postNotificationName:@"HotSpotTouched" object:dict];
the function in class A getSensorsData
is not being called.
whats wrong here ??
thanks !