When using the (very popular) native module "NappDrawer" the window flickers for a few milliseconds upon replacing the center ViewController with a UINavigationController.
The problem only appears in landscape mode.
"NappDrawer" uses the native library "MMDrawerController" which doesn't have this issue.
There's also a Github issue with more information on this issue:
https://github.com/viezel/NappDrawer/issues/7
To reproduce the issue download and install the latest version of the NappDrawer module and create a new app with the given app.js.
If you repeatedly click on "Flickers in landscape" you will see the effect.
https://github.com/viezel/NappDrawer/tree/master/ios/dist
I managed to take a screenshot of the iOS 6 version - which also has this bug. You can see that the window/buttons are not yet positioned correctly which is why the screen flickers.
I have been doing some testing and research. The main problem here is performance with Titanium. When the window is replaced and displayed, a number of internal UIViewController methods are called on the window, and this is where in Titanium we need to process the properties of the window, sub views, etc. After testing and debugging I found a work around, which is a small change in the MMDrawer source code, basically add a delay when a UIViewController removed as it is being replaced. (Let me know if you'd like to implement it) The good news is that this is actually working much better in SDK 3.3.0.GA, as Harish mentioned. There has been some performance improvements in Titanium from 3.2.0 to 3.3.0 and these have fixed the issue. The latest tests I have done have been with Ti SDK 3.3.0.GA and I have not seen the flickering anymore. PS: To see the window, please use a different background color, "black" doesn't really do it. Marking ticket as fixed.
Hi [~penrique], Can you please help me on adding a delay when a UIViewController removed to avoid the flickering? Thanks!
[~mano_mykingdom], if you're using the latest Titanium SDK, 5.x.x, try adding this to your tiapp.xml, in the ios section:
Thank you for your help [~penrique], but I'm using 4.1.0.GA only but still it is flickering while replacing the nav window, easily noticeable at nav bar only. Do you have any other suggestions or will that delay work?
Closing ticket as fixed, if there are any problems, please file a new ticket.