When Opening a New Tab (or Window) - the Bar Flickers

You must Login before you can answer or comment on any questions.

this question was originally asked here and was closed even so it doesn't give solution. even when the barImage is moved into createWindow setting, the flicker is still visible. is there any way how to completely get rid of it? or maybe somehow pre-render window (open it hidden or something) ? ios 4.2, TI SDK 1.7rc

2 Answers

hah ok i've fixed this.

the fix requires changing ObjectiveC code but its worth. just be careful when you ll update to new version of SDK, you ll have to do this thing every time unless TI team integrate this in.

open this file (SDK version may vary so use that one what are you using):

/Library/Application Support/Titanium/mobilesdk/osx/1.7.0 RC/iphone/Classes/TiUIWindowProxy.m
find this function:
-(void)setBarImage:(id)value
and change this:
[self performSelectorOnMainThread:@selector(updateBarImage) withObject:nil waitUntilDone:NO];
to:
[self performSelectorOnMainThread:@selector(updateBarImage) withObject:nil waitUntilDone:YES];
basically this ll hold on rendering until image is fully rendered and will get rid of flicker.

happy coding :)

Very slick solution, but unfortunately helped only on simulator; Still flickers on the device. Ideas?

Your Answer

Think you can help? Login to answer this question!