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 7880055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:03:10+00:00 2026-06-03T04:03:10+00:00

I have a webview in a uitableview cell. The problem is that the web

  • 0

I have a webview in a uitableview cell. The problem is that the web view only takes up 75% of the uitableview cell

I am not sure how iOS decided the height of the web view, as I can’t seem to increase how much space it takes. I can increase the tableview cell’s height higher or lower, but the web view does not increase.

One thing I imagined I needed to do was somehow get the height of the web view itself based on how big the text is so that it can automatically scale the size of the tableview cell.

a) I’m not sure what function retrieves it

b) I think this would go in (void)webViewDidFinishLoad:(UIWebView *)webView method, but I can’t get the app to go into that function. I tried debugger and it seems not to go in there at all. (web view object is within its own controller)

#import "WebViewCell.h"

NSUInteger const WEB_VIEW_ROW_HEIGHT = 75;

@implementation WebViewCell

@synthesize webView;

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
 self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
    // Initialization code
}
return self;
}

  - (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
  [super setSelected:selected animated:animated];

// Configure the view for the selected state
}

 @end

and in the controller which actual populates the tableview cell with the web view:

  WebViewCell *cell = [[ViewManager instance] loadWebViewCell:self.tableView cellID:eventDetailsValueCellID];

        NSString *htmlText = [news valueForKey:propertyName];


        [cell.webView loadHTMLString:htmlText baseURL:nil];


        return cell;

I’m not sure where to put the (void)webViewDidFinishLoad:(UIWebView *)webView method with this setup. Does it go in the WebViewCell.m or the controller that calls WebViewCell.m

also,the root question is how can I make the web view scale to the size of the cell?

  • 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-03T04:03:11+00:00Added an answer on June 3, 2026 at 4:03 am

    The (void)webViewDidFinishLoad:(UIWebView *)webView needs to be implemented by the UIWebViewDelegate.

    Try adding cell.webView.delegate = self in the cellForRowAtIndexPath method and also adding the delegate protocol ‘UIWebViewDelegate’ to your controller’s header file.

    This should at least get your (void)webViewDidFinishLoad:(UIWebView *)webView call to fire allowing you to do your height calculation after the web view has loaded.

    The calculation would probably look something like:

    webView.frame = CGRectMake(0, 0, webView.superview.frame.size.width, webView.superview.frame.size.height);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have put a web view inside a uitableviewcell Problem : didSelectRowAtIndexPath is not
I have a WebView that I've added to a view group: webView = new
I have a webview that's supposed to show cyrillic text wv.loadData( myStringHtml, html/text, utf-8);
I have a webview that I'm creating in an Activity which is a child
I have a webview that shows some animated boxes, but it slows down and
i am not sure if this is a good route to go,...i have some
I have Webview application that uses progress bar dialog. It works fine but the
I can't resolve my problem with scrollView and webView, I know, that i can't
I have a webview in an iOS App. I have a select box with
I have a WebView that I'm using to open some files stored in the

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.