Here is my method that my ViewControllerA
implements as part of a NSNotification
system:
- (NSInteger)updateTortoiseLevel:(NSNotification*)notification {
_updateValue = 0;
if ([notification.name isEqualToString:@"gameToTortoise"]) {
NSNumber* update = [notification.userInfo objectForKey:@"gameToTortoise"];
updateValue = [update integerValue];
} else {
// do other things
}
return _updateValue;
}
First off, I don't even know if I can return anything from this type of method, so let me know if I can't.
Here's what I'm after:
- (void)viewWillAppear:(BOOL)animated {
if (_update == 1) {
[self runCellUpdates];
}
}
I'm using the notification system when I pop ViewControllerB
to A
. What happens first?...Does notification get sent before viewWillAppear:
? If it doesn't, how can I use updateTortoiseLevel:
inside viewWillAppear:
if at all?
Do not mention "use delegate design pattern instead" because I already considered it but it will not work for my current design (at least 95% sure on that). Cheers