TiViewShadow icon indicating copy to clipboard operation
TiViewShadow copied to clipboard

Not working with Alloy views

Open rishinaveen opened this issue 12 years ago • 0 comments

Hi O,

I tried to get this work with a Alloy View element and failed.

It works if i create the view in the controller and then add to the window. I know that shadow properties in TSS don't apply to elements. So I am adding the shadow properties the Alloy View element from the controller and still doesn't work. Any idea how to get this to work. See below the code i am using.

_This works_* var tabView = Ti.UI.createView({ width: '100%', height: '100px', top: 100, left: 0, backgroundColor: 'yellow', shadow: { shadowRadius:10, shadowOpacity:0.5, shadowOffset:{x:0, y:0} //shadowColor: 'red' } });

$.index.add(tabView); $.index.open();

_This doesn't_

View part.... <Alloy> <Window> <View id="mainView" class="mainView"> <View id="tabView" class="tabView"> <Label>Hello</Label> </View> </View> </Window> </Alloy>

Controller part.... $.tabView.setShadow({ shadowRadius:10, shadowOpacity:0.5, shadowOffset:{x:5, y:0} }); $.index.open();

TSS part... ".tabView": { left: 0, top: 10, width: '100%', height: '100px', backgroundColor: 'yellow' }

ios simulator screen shot may 31 2013 8 30 22 pm

And then i added background color to show the difference.

ios simulator screen shot may 31 2013 8 32 34 pm

rishinaveen avatar Jun 01 '13 00:06 rishinaveen