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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:01:38+00:00 2026-06-02T22:01:38+00:00

I have HTML I am generating in my app. I know it’s valid because

  • 0

I have HTML I am generating in my app. I know it’s valid because I ran it through W3Schools “edit and try it”. It performs exactly as I designed it.

Here is the definition of the website in the header file:

@interface ReportViewController : UIViewController <UIWebViewDelegate>  {
    IBOutlet UIWebView *reportWebView;
}

@property (nonatomic, retain) UIWebView *reportWebView;
@property (nonatomic, retain) NSMutableString *html;

- (void) generateReport;
- (void) Alert: (NSString *) title andData: (NSString *) errorMsg; 

@end

Here is where I finish creating the HTML and try to display it:

        //  now do the table
        [html appendString:@"<div><table border class=\"boldtable\">" 
        "<tr BGCOLOR=\"ADDAFE\">" 
        "<th>STA&nbsp;</th><th>BS&nbsp;</th><th>HI&nbsp;</th><th>FS&nbsp;</th><th>ELEV&nbsp;</th><th>Desc</th>" 
        "</tr><p>"];
    }    

    //  finally, end the table, etc.
    [html appendString:@"</table></div></body></html>"];

 //   UIWebView *reportWebView = [[UIWebView alloc] init];
    //[reportWebView loadHTMLString: html baseURL:nil];
    [self.reportWebView loadHTMLString:html baseURL:[NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]]];
}

As you can see, I have tried several different variations of displaying the HTML string. What is the correct way to do this?

  • 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-02T22:01:40+00:00Added an answer on June 2, 2026 at 10:01 pm

    Iulius Caesar Jacques Cousteau gave the correct answer in a comment:

    reportWebView is an IBOutlet, indicating that it’s created in an xib. Is the outlet connected? Is the nib loaded? What’s with the commented-out UIWebView *reportWebView = [[UIWebView alloc] init];? Is this your exact code? Are you creating a local variable reportWebView that’s shadowing the ivar?

    but never came back to set it, therefore I am answering it for him.

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

Sidebar

Related Questions

I have an app that is importing data from JSON and generating (through JQuery's
I have php generating html and I want to create layers. Basically I want
I have HTML view using 2010 .NET, which I am generating in the report
I have an XSLT file generating plain HTML. I need to wrap some elements
I have an ASP.NET page and I am generating an HTML table in my
I have ASP.Net code generating my button's HTML for me using divs to get
I have an MVC application view that is generating quite a large HTML table
I have a problem with generating html with razor engine. In my case I
I have an issue where I'm generating links for my MVC app in a
Although I have experience with SQL and generating HTML reports with PHP, I'm a

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.