Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7813017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:42:40+00:00 2026-06-02T04:42:40+00:00

I added a WebView to my app and I’m loading a page into it

  • 0

I added a WebView to my app and I’m loading a page into it using this code:

-(void)awakeFromNib{
    NSString *resourcesPath = [[NSBundle mainBundle] resourcePath];
    NSString *htmlPath = [resourcesPath stringByAppendingString:@"/calendarHTML/test.html"];
    [[webView mainFrame] loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:htmlPath]]]; 
}

However, when I run the app I receive the following error:

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.!

error log

What is causing this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T04:42:41+00:00Added an answer on June 2, 2026 at 4:42 am

    This is caused by the fact that the nib containing the window that you have placed the WebView into is using the new Auto Layout feature, introduced in Lion.

    When a nib file has auto layout enabled, the window will call the -layout method on all NSView objects in the window.

    This causes a problem with WebView because it had a method named -layout before it the method was added to the NSView API in Lion, and WebView‘s layout method does not understand auto layout.

    Probably the best fix for the time being is to use the old autoresizing mask method of laying out the views in your window. As Xcode now creates nib files with autolayout enabled, you need to disable it yourself.

    You can do that in the File inspector for your nib file, by disabling the Use Auto Layout checkbox.

    interface builder inspector

    After you do this, you’ll need to make sure that all the views in the nib have the correct autoresizing settings in the Size tab of the view inspector.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is the code I am using: NSString *imagePath = [[NSBundle mainBundle] resourcePath]; imagePath
This is about loading youtube videos using latest embedded format (iframe) inside a webview.
When is a page added to the forward backward list in WebView? I have
I've added a webview to my Android app so the users can like a
Cocoa app, SnowLeopard I have a WebView in to which I'm loading HTML (essentially
I have added a Javascript interface object to a WebView using the addJavascriptInterface() method
I have added a JavaScript Interface to WebView. I am able to use all
I added a navigation control to switch between views in my app. But some
I added a project to a solution checked into a team foundation server solution
In my iPhone app, I have this button, that opens a webcal:// URL in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.