TimOliver / TOWebViewController

A view controller class for iOS that allows users to view web pages directly within an app.
http://www.timoliver.com.au/2014/07/27/towebviewcontroller-an-open-source-web-viewer-for-ios/
Other
1.48k stars 211 forks source link

part of screen is black while initialize and load request #35

Closed yanzhiwei147 closed 9 years ago

yanzhiwei147 commented 10 years ago

I found this problem. when i run demo app on iOS simulator,it can load request at first time appear. Network environment: 100% lost,make sure it waiting until time out. Result: contentSize of UIWebView not equal CGSizeZero, I swipe to bottom, found bottom part of screen is display black . thank you.

TimOliver commented 10 years ago

Hi there!

Yeah, I'm aware of this issue. Sadly, it seems to be a fact of how UIWebView works. I didn't really look at trying to hack a fix for it, as it's only visible briefly while the page loads.

If the network is down (So you get a good long look at it), I'm planning on adding a proper 'No Network Access' slide appear on screen.

I haven't really tested it yet, but I THINK this feature doesn't occur in iOS 8's new WKWebView view.

Thanks for the issue! For the time being, I'm going to focus on supporting WKWebView and then see what we can do for legacy support.

I'll leave it open for now to remind me to fix this. XD

yanzhiwei147 commented 10 years ago

I try to resolve this issue, comment those code: self.webView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; I found it work correct,but rotation cant't work expected.

TimOliver commented 10 years ago

Wow, really?? Interesting point!

Yeah, we need the auto-resizing masks to ensure the view matches the size of the window, so we can't disable that. But that might have given some insight as to what's actually happening in there. :)

-Tim

On 4 September 2014 19:47, yanzhiwei147 notifications@github.com wrote:

I try to resolve this issue, comment those code: self.webView.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth; I found it work correct,but rotation cant't work expected.

— Reply to this email directly or view it on GitHub https://github.com/TimOliver/TOWebViewController/issues/35#issuecomment-54459728 .

yanzhiwei147 commented 10 years ago

Yeah, I'm sorry that reply comment long time after. You found other clues of this issues?

TimOliver commented 9 years ago

Closing this off. There's really nothing we can do about this when it comes to UIWebViews. Additionally, I'm not thrilled at adding WKWebView after I found out that it doesn't share cookies with the other web connection APIs in iOS.