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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:04:59+00:00 2026-06-12T12:04:59+00:00

I have a form sheet segue that should display hard-coded html page. Now I

  • 0

I have a form sheet segue that should display hard-coded html page.
Now I have a two part problem first problem is

 <CENTER><H1>A Simple Sample Web Page</H1><H4>By Frodo</H4>
<H2>Demonstrating a few HTML features</H2></CENTER>

is displayed like

enter image description here

I can change <CENTER>tag to <left> in that case it works but it limits my options. How can I display this content In the middle of the screen without alignment issues?

Second part of the question is How can I embed a color or a link to content. On line ""FFFFFF">\n" I get the error that says Expected ':' and on line "<a href="http://somegreatsite.com">\n" Half of the line is green which is seems like comment on the screen that means it will not executed by XCode

My full code is like :

- (void) createWebViewWithHTML{
    //create the string
    NSMutableString *html = [NSMutableString stringWithString: @"<html><head><title></title></head><body style=\"background:transparent;\">"];

    //continue building the string
    [html appendString:@"<BODY BGCOLOR="
     ""FFFFFF">\n"
     "<CENTER><IMG SRC="clouds.jpg" ALIGN="BOTTOM">
     "</CENTER> \n"
     "<HR>\n"
     "<a href="http://somegreatsite.com">\n"
     "Link Name</a>\n"

     "is a link to another nifty site\n"

     "<H1>This is a Header</H1>\n"

     "<H2>This is a Medium Header</H2>\n"

     "Send me mail at <a href="mailto:support@yourcompany.com">\n"

     "support@yourcompany.com</a>.\n"

     "<P> This is a new paragraph!\n"

     "<P> <B>This is a new paragraph!</B>\n"

     "<BR> <B><I>This is a new sentence without a paragraph break, in bold italics.</I></B>\n"

     "<HR>\n"];
    [html appendString:@"</body></html>"];

    //instantiate the web view
    webView = [[UIWebView alloc] initWithFrame:self.view.frame];


    //make the background transparent
    [webView setBackgroundColor:[UIColor clearColor]];

    //pass the string to the webview
    [webView loadHTMLString:[html description] baseURL:nil];

    //add it to the subview
    [self.view addSubview:webView];

} 

Edit::
Added story board picture

enter image description here

So how can I make correct alignment and embed color/link correctly?

  • 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-12T12:05:00+00:00Added an answer on June 12, 2026 at 12:05 pm
    1. Check if your UIWebView has the right size. It seems to be bigger than the screen.

    2. Place a \ before any ” in your hard-coded string.
      e.g.:

      NSString *testString="This is a \"Test\"";
      

      results in

      This is a “Test”

    Hope this helps

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

Sidebar

Related Questions

I have some code that works and changes the style sheet using a form.
I have an EXCEL sheet.it has various form-fields that are named as smrBgm133GallonsGross/ smrBgm167GallonsGross
I have a form in my sidebar that is part of a Wordpress plugin
I have a form which includes a data sheet. I would like to make
I have form in my page, I am using ajax.beginform(). Inside this form I
I'm trying to create a form sheet modal on iPad, which should be a
I have a UINavigationController which uses Form Sheet views and I have viewController 1
I am having trouble getting the page to work. I have my form method
I have a google form which populates a google spreadsheet (source sheet). I located
I have a large form in html with approximately 100 -150 fields. I was

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.