开发者

UIWebview cuts 5 lines of text at the button with <meta name="viewport" content="width=device-width

开发者 https://www.devze.com 2023-03-11 21:56 出处:网络
I want to show some details of a Project in a UIWebView. So here is the code of the site: <html>

I want to show some details of a Project in a UIWebView.

So here is the code of the site:

<html>

                    <style type="text/css">
                        body { font-family:Arial; }
                    </style>

                <body>
            <h1>Project Details</h1>
            <h2>Project: Blub</h2>
            <table>
                <tbody><tr>
                    <td>Manager:</td>
                    <td>Hansi</td>
                </tr>
                <tr>
                    <td>Start:</td>
                    <td>2010-10-01 08:00:00.0</td>
                </tr>
                <tr>
                    <td>Finish:</td>
                    <td>2012-06-30 17:00:00.0</td>
                </tr>
            </tbody></table>
            <hr>
             <table border="0">
                 <tbody><tr valign="top">
                     <td>Report Date:</td>
                     <td colspan="3">2011-04-14 00:00:00.0</td>
                 </tr>
                <tr valign="top">
                    <td>Current Status:</td>
                    <td><img alt="yellow" src="/Source/Yellow.gif"></td>
                    <td>Previous Status:</td>
   开发者_运维知识库                 <td><img alt="yellow" src="/Source/AltSlightYellow.gif"></td>
                </tr>
                 <tr valign="top">
                     <td>Measures</td>
                     <td colspan="3">- Here are some details blabalaasldfjlasdkfjlkasjfdlksdfldjslkdfjlksdfjlkjsdlkfj
</td>
                 </tr>
            </tbody></table>

So there is always about 3 lines of code which are cut. But if you scoll up you can see that everything is available but it bounces back if you release the screen

So why the hell is it like this.

It doesnt matter how much description is written, there are always 3 lines left out

Im going nuts please help

https://picasaweb.google.com/hamisam/IphonePics?authkey=Gv1sRgCMX517DOq4f9tgE&feat=directlink

How i create my webview:

NSMutableString *address = [NSMutableString stringWithString: self.url];
 [address appendString:self.projectID];
 [address appendString:@".html"];

NSURL *targetURL = [NSURL URLWithString:address];

NSURLRequest *request = [NSURLRequest requestWithURL:targetURL];

[webView loadRequest:request];


After looking at your screenshot i can see what the problem is:

Your UIWebView seems to have fallen behind the status bar.

If you are using the interface editor, open up the xib and resize the uiwebview. I believe you can check in the inspector to show a status bar in the top, and thhen resize the uiwebview accordingly.

If you are adding it programatticly, edit the cgrectmake to compensate your navigation bar.

0

精彩评论

暂无评论...
验证码 换一张
取 消