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

  • SEARCH
  • Home
  • 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 4612896
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:28:06+00:00 2026-05-22T01:28:06+00:00

I need to load HTML in a cell of a table view. I’m using

  • 0

I need to load HTML in a cell of a table view. I’m using a UIWebView instead of a UILabel so that the html tags are interpreted.
The size of the WebView differs, so I’m doing

- (void)webViewDidFinishLoad:(UIWebView *)webView {
   [webView sizeToFit];
}

So that the webview’s size is properly set. However, I also need to define the height of the cell, which I was planning to set inside

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
}

Unfortunately the heightForRowAtIndexPath is called before webViewDidFinishLoad, so I’m not able to define the cell’s height properly.

Any suggestions for my problem? I found an old question about this, but it didn’t help me: How to determine UIWebView height based on content, within a variable height UITableView?

Thanks,

Adriana

  • 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-05-22T01:28:07+00:00Added an answer on May 22, 2026 at 1:28 am

    I found a solution to my problem. I need a webview at the end of the tableview, so I’ve done the following:

    - (void)viewWillAppear:(BOOL)animated {
    
        CGRect frame = CGRectMake(10, 0, 280, 400);
        webView = [[UIWebView alloc] initWithFrame:frame];
        self.webView.delegate = self;
        webView.hidden = YES;
    
        //It removes the extra lines from the tableview.
        [self.tableView setTableFooterView:self.webView];
        ...
    }
    
    - (void)webViewDidFinishLoad:(UIWebView *)webView {
        [webView sizeToFit];
        [webView setBounds:CGRectMake(webView.bounds.origin.x, webView.bounds.origin.y, webView.bounds.size.width+20, webView.bounds.size.height)];
        self.webView.hidden = NO;
        [self.tableView setTableFooterView:webView];
        ...
        [webView release];
    }
    

    It works and it’s fast!

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

Sidebar

Related Questions

I need to load HTML and parse it, I think that it should be
I need to load a HTML wrapper dynamically depending on data that gets populated
When loading a html page using JQuery load, I also need to call another
I am trying to load a html page through UIWebview.I need to disable all
I am using jQuery. test.html contains images and text. Now I need to load
I need to load an XML source using Simple XML, duplicate an existing node
Two Delphi programs need to load foo.dll, which contains some code that injects a
I need to load an html string into memory from the page and remove
I need to load wikipedia revision histories into POJOs, so I'm using JAXB to
I want to add a UIWebView into a cell. THe HTML data will change

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.