I can’t receive a notification with this:
a class for doing NSURLConnection async stuff
- (void)connectionDidFinishLoading:(NSURLConnection *)connection {
NSDictionary *userInfo = [NSDictionary dictionaryWithObjectsAndKeys:_receivedData, @"receivedData", nil];
[[NSNotificationCenter defaultCenter] postNotificationName:kWebServiceURLTemperaturaMaximaKMLNotitificationName object:self userInfo:userInfo];
}
another class observing the notification:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceivedCompleteData:) name:kWebServiceURLTemperaturaMaximaKMLNotitificationName object:self];
any thoughts?
Error is here:
This means that notification center will send notification named
name:kWebServiceURLTemperaturaMaximaKMLNotitificationNametoselfthat is also generated byself. You should replaceobject:selfwithobject:nil(to receive any notification namedname:kWebServiceURLTemperaturaMaximaKMLNotitificationName) or with object that is actually sending the notification.