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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:27:04+00:00 2026-05-15T19:27:04+00:00

I am using the UIWebView on iPad, which I initialize by the code below.

  • 0

I am using the UIWebView on iPad, which I initialize by the code below. The problem is that the view is never displayed on the top of the page just under the Status bar, but there is another 44px space (filled with black color) – for Navigation Bar, which I do not want to display. Any hints how I can make the UIWebView be displayed without the 44px space?

Thanks a lot,

BR

STeN

- (void)viewDidLoad
{
 [super viewDidLoad];
 CGRect rectApp = [[UIScreen mainScreen] applicationFrame];

 self.webView = [[[UIWebView alloc] initWithFrame:rectApp] autorelease];
 self.webView.backgroundColor = [UIColor whiteColor];
 self.webView.scalesPageToFit = YES;
 self.webView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
 self.webView.delegate = self;

 [self.view addSubview: self.webView];
 [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.test.com/shop/index.php"]]];
}
  • 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-15T19:27:05+00:00Added an answer on May 15, 2026 at 7:27 pm

    The problem is that the coordinate system of the view you’re adding it to isn’t the coordinate system of the window; the view has already been adjusted for the status bar.

    Change it thus:

    CGRect rectApp = [[UIScreen mainScreen] applicationFrame];
    rectApp.origin = CGPointZero;
    

    Or better yet, use self.view.bounds, since self.view presumably refers to a view that fills the application’s window anyway.

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

Sidebar

Related Questions

I have a graphic-intensive iPad app that features a UIWebView. Using the simulator (iOS
I have a problem with my application that is using uiwebview to load the
I want to add padding on UIWebview using Javascript, because I switch the view
I have a piece of HTML which I am displaying inside a UIWebView using
I know that I can run a line of javascript code after the page
I have an iPad app that receives data using UDP sockets. And it has
i'm using UIWebview to display a local html page. i tried this text<span><span/>text in
I have a UIWebView which loads an HTML page which has some links to
I am new to iPad developer, I'm using UIWebView on the iPhone to display
I am using jQuery Mobile in an application that runs inside a UIWebView .

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.