iPhone: possible backgroundGradient bug?
Hi there,
It seems like that setting the backgroundGradient on a Window could cause the Window to override other elements added to the Window.
This applies to SDK 1.3.2
Reproduce code:
var btnNew = Ti.UI.createButton({title:'Test Button'});
var winNew = Ti.UI.createWindow({
    title: 'Test Window',
    backgroundGradient: {
        type: 'linear',
        colors: [{
            color: '#000',
            position: 0.0
        }, {
            color: '#fff',
            position: 1.0
        }]
    }
});
winNew.add(btnNew);
winNew.open();
After the winNew opened, the button is missing. But actually it's under the gradient layer (zIndex problem?).
Is this a possible bug?
2 Answers
- 
				
					Accepted AnswerThis is definitely a bug. I had to deal with the same problem. I worked around it by doing some magic with layered views and not setting gradient on the window object itself. 
- 
				
					That surely does the trick.. My intention for setting up the gradient was to replace the need for a background image, which also reduce the size of memory cache. Anyway, thanks for your answer. Although it's not a big issue at all. Hopefully the team will be able to pick it up on the next release.