Grey screen when tabswitching on iOS

I found this bug which only happens on iOS.

I discovered it with my own project but it also happens with the default project of rhomobile. So ill use that as a reference

The only thing I did was create a tabbar like this:

Rho::NativeTabbar.create([{
      :label => "Shop",
      :action => "/app",
      :selectedColor => 0x56B537,
      :backgroundColor => 0xb5bdc8
      },
      {
      :label => "Transacties",
      :action => "/app",
      :selectedColor => 0x56B537,
      :backgroundColor => 0xb5bdc8
      }],
      {:background_color => 0xF2EDF0, :iOS7SelectedColor => 0x56B537 , :place_tabs_bottom => true}, url_for(:action => :tabbar_callback)
    )

The thing that happens is this:
I start the app (picture 1) and the screen shows just fine

I rotate my device (picture 2) and the screen shows just fine horizontally

I open a tab2 (picture 3) and the screen shows a grey rectangle on the right of the screen

I rotate my device (picture 4) and the screen shows a grey rectangle again

Picture 1

Screen Shot 2014-08-08 at 9.21.55 AM.png

Picture 2

Screen Shot 2014-08-08 at 9.22.19 AM.png

Picture 3

Screen Shot 2014-08-08 at 9.22.33 AM.png

Picture 4

Screen Shot 2014-08-08 at 9.22.50 AM.png

This only happens when I open tab2 initially with horizontal screen, if I open tab2 with vertical screen I can just switch between orientation just fine

Anyone has a fix or idea why this happens??

Thx

Jochem Pouwels
I can fix this by preloading

I can fix this by preloading the other tabs on the first tabbar callback like this:

WebView.navigate(url_for(:controller => :Order), 1)

WebView.navigate(url_for(:controller => :FAQ), 2)

WebView.navigate(url_for(:controller => :Information), 3)

But this causes the grey screen to appear for a longer period when the application starts (only when using tabbar) (When tabbar is initialized the splashscreen dissapears but iOS did not render the first page yet, a grey screen is displayed until first page is loaded)

Is there any way to let the splashscreen still show when ios tabbar is loading the first page? and then let the splashscreen disable when the first page is fully loaded?

**** GREY SCREEN IS BECAUSE I SET backgroundColor on tabs, normally its white I think.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kutir Mobility
Hi JochemI was able to

Hi Jochem

I was able to reproduce this issue and at one point, we simply locked the device to portrait mode.

May be it also got to do with JQM rendering but not sure.

Have you tried using it with other frameworks than JQM ?

Thanks

Visnupiya R

Kutir Mobility

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jochem Pouwels
I did not try any other

I did not try any other frameworks then JQM, but I did fix this problem!

I fixed it by executing ruby code on the pageshow event (ajax request to my ruby function)

The ruby code preloads the tabs now correctly without extending the time the first grey screen is displayed, it also makes the user experience way better as no grey screen (to render the page) is displayed anymore when tabswitching

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kutir Mobility
Would be great if you can

Would be great if you can write a blog about

Thanks

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jochem Pouwels
I will do that soon, Kutir

I will do that soon, Kutir Mobility!

its definitely an improvement on the native tabbar on iOS in RhoMobile

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jochem Pouwels
Maybe a silly question but

Maybe a silly question but how do I create a new blog ^^?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kutir Mobility
Could you please help us?

Could you please help us?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jochem Pouwels
I just found the URL to

I just found the URL to create a blog: https://developer.motorolasolutions.com/blog/create-post.jspa

But when I want to publish it, I need to browse for places first but all places are greyed out/disabled

Any help?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Ritesh Gupta
Hi,You can also publish the

Hi,

You can also publish the blog in your personal space and then we can highlight it.  Also please feel free to email it to site administrators: , & and we can publish it on your behalf.

Thank you and I look forward to your blog entry.

Regards,

Ritesh

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jochem Pouwels
I emailed it to  Rob Galvin,

I emailed it to  Rob Galvin, did you receive it?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Robert Galvin
Jochem We will also look to

Jochem We will also look to get this detail in our docs. Thanks for your efforts. Rob Galvin

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments