baker icon indicating copy to clipboard operation
baker copied to clipboard

White flash

Open yumyo opened this issue 15 years ago • 56 comments

The (new) two rendering modes "screenshot" and "three-cards" are simply great! However we are experiencing a white flashing effect for every page while in "screenshot" mode and minor rendering problems in "three-cards" mode (white flashes and small reloading-like bugs).

yumyo avatar Oct 06 '11 16:10 yumyo

Unfortunately it's a bug in WebKit and we are still not able to remove it completely. We saw that sometimes building the page differently, or making them shorter, helps reducing that bug.

We are constantly trying to fix that.

folletto avatar Oct 06 '11 16:10 folletto

Thanks Fol. I don't know if this helps but we are working with the same bounce of files (html, css, js) in both the stable Baker 2.0 and the latest 'nightbuild'. Inside the stable versione the above bugs are mainly absent (especially the white flash) Please let us know if we could perform some additional testing for you guys. We'll do it anyway ; )

yumyo avatar Oct 10 '11 15:10 yumyo

... as far as we understand those bugs are related to the UIWEBVIEW at preloading stage. We just performed the same test (first comment) with the build 85-g93fe8b4 but inside the brand new iOS5. Everything is smoother and the white flash occurred just on the heavier content after a non-sequential flip through the pages. No doubt iOS5 introduced a lot of improvements but keep investigating the preloading matter still seem the way to gain a stable and robust environment. We hope to be able to contribute soon since we're (finally) starting a custom development project. In the meanwhile we don't want to loose the chance to say again: thank you guys for this great piece of work.

yumyo avatar Oct 14 '11 08:10 yumyo

Thank you! :)

Yes, if the problem is diminished with the update it's another sign that it should be a UIWebView issue, ach. :|

Unfortunately we tried to identify the moment when the page is really ready, but it seems there's no easy way... :|

folletto avatar Oct 14 '11 11:10 folletto

We tried to optimize our book as far as it was possible, and after a more detailed test we found:

  • 'three-card' rendering mode: Flash just when flipping more than 1 pages.
  • 'screenshot' rendering mode: always flash.

yumyo avatar Oct 18 '11 15:10 yumyo

Paste this two lines in the (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:

[webView setOpaque:NO];
webView.backgroundColor = [UIColor clearColor];

I don't know if this is a valid form, but the white flash didn't appear. I am no objective-c programmer, so please understand if this is a bad variant:)

I read this at: http://stackoverflow.com/questions/1547102/cant-change-background-for-uiwebview-in-iphone-sdk

palianah avatar Nov 16 '11 13:11 palianah

That's a good suggestion, we'll try it. :)

folletto avatar Nov 16 '11 16:11 folletto

ok :)

palianah avatar Nov 16 '11 17:11 palianah

Just tried inserting the above code after the request:

#pragma mark - WEBVIEW

  • (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {

    // Sent before a web view begins loading content, useful to trigger actions before the WebView. [webView setOpaque:NO]; webView.backgroundColor = [UIColor clearColor];

Don't know if if is correct. No errors compiling. White flash still present.

yumyo avatar Nov 17 '11 08:11 yumyo

First, I got "no rule to process file warning..." for the two .js files but managed to solve it using this tip http://www.nimblekit.com/wiki/index.php/Warning:_no_rule_to_process_file

Now I still can't see my ebook with the new xcode 4.2. Any suggestions?

casfian avatar Nov 26 '11 13:11 casfian

I don't understand. How is that related to the white flash issue described here? Could you detail a little more?

folletto avatar Nov 26 '11 13:11 folletto

I think I posted wrongly...I should have posted in bugs report. I can't seem to get baker to work in Xcode 4.2. I downloaded it from bakerframework.com Now I'm trying to get the latest built from Github...

casfian avatar Nov 26 '11 13:11 casfian

Yes please. Open a new issue. I'd advise if you have problems to use the version from the website and not the work in progress from here. :)

folletto avatar Nov 26 '11 13:11 folletto

Yeap! Now it's working from Github. Maybe you should upload the fixed baker download to bakerframework.com

casfian avatar Nov 26 '11 13:11 casfian

You are the first one reporting a problem with the stable version. Please open a new issue if you'd like with all the details of the problem you had so we can rule out it was just a problem in your config, since from the message above it seems you are touching the project config, and that might have broken something.

Please be also aware that the master version is a development one, an might contain bugs.

folletto avatar Nov 26 '11 15:11 folletto

Any luck solving this issue yet?

adilfazal avatar Dec 14 '11 09:12 adilfazal

Nope, sorry.

folletto avatar Dec 14 '11 10:12 folletto

I am having issue at iOS 4.3. It seems fine in iOS 5.0. Please let me know if you any work around in mind.

adilfazal avatar Dec 14 '11 12:12 adilfazal

Hi Folleto,

I just want to add that my book experiences the white flash issue frequently in OS5 with an iPad 2. It comes and goes. Sometimes only the last page of the book does it and the first pages are fine.

If you want to test my book, let me know and I'll place a download link.

Thanks!

ayarmanqu avatar Dec 15 '11 01:12 ayarmanqu

Yup having something else to test would be nice, send it to us at our info mail so we can check it. :)

folletto avatar Dec 15 '11 01:12 folletto