Grey screen when tabswitching on iOS

J Jochem Pouwels 2 years 11 months ago
3 1 0

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

Picture 2

Picture 3

Picture 4

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

Please register or login to post a reply

1 Replies

J Jochem Pouwels

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.

CONTACT
Can’t find what you’re looking for?