KVO on the "windows" value of UIApplication?

Posted by Ariel Malka on Stack Overflow See other posts from Stack Overflow or by Ariel Malka
Published on 2010-05-17T08:42:25Z Indexed on 2010/05/23 12:30 UTC
Read the original article Hit count: 274

Filed under:
|

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.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uikit