The following is not working:
[[UIApplication sharedApplication] addObserver:self forKeyPath:@"windows"
options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld)
context:NULL];
Together with that, on the Observer side:
- (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
NSLog(@"never reached!");
}
Any clues?
N.B. My uber-goal is to get a notification when a (system-generated) UIAlertView is shown.