Re: Is UIWebView KVO compliant?
Re: Is UIWebView KVO compliant?
- Subject: Re: Is UIWebView KVO compliant?
- From: Roland King <email@hidden>
- Date: Tue, 10 Apr 2012 12:06:05 +0800
probably isn't an observable property. Generally unless the documentation says a property is observable, I assume it's not. It would be nice to know from Apple if they believe that they have documented most properties which are intended to be KVO as such.
In your case you're probably going to have to use one of the delegate methods as a place to check whether 'canGoBack' is YES or NO, that will probably work well enough.
On Apr 10, 2012, at 11:08 AM, sonofsky wrote:
> I've set up KVO notification to watch some properties of a UIWebView like so
>
> [webView addObserver:self
> forKeyPath:@"canGoBack"
> options:NSKeyValueObservingOptionNew
> context:NULL];
> and have
>
> - (void)observeValueForKeyPath:(NSString *)keyPath
> ofObject:(id)object
> change:(NSDictionary *)change
> context:(void *)context
> but it never gets called. Am I missing something or is UIWebView just not observable?
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden