Autodetect warning on Mac OS X
I get a warning, I don't fully understand every time I run my application:
Layout still needs update after calling -[WebHTMLView layout]. WebHTMLView or one of its superclasses may have overridden -layout without calling super. Or, something may have dirtied layout in the middle of updating it. Both are programming errors in Cocoa Autolayout. The former is pretty likely to arise if some pre-Cocoa Autolayout class had a method called layout, but it should be fixed.
(I saw this related question , but the answer provided solves a different problem, so my question is.) The warning pops up as soon as I add a website view to my application. What does this mean and how can I fix this problem?
source to share
It looks like it's - (void)layout
implemented in WebHTMLView
. The source for WebKit is available on Apple's open source page for viewing.
http://www.opensource.apple.com/source/WebKit/WebKit-7534.53.11/mac/WebView/WebHTMLView.mm
The Auto Layout documentation states that you only need to implement a "layout" if you need custom logic to sub-layout your layout when using auto-layout. It goes on to say that you should always name [super layout]
in your custom implementation. This does not happen with WebHTMLView
.
This message can probably be safely ignored for your project. The same thing happens for me in a new new project.
source to share