UIView ombre ne fonctionne pas

C'est mon code.

listView.layer.masksToBounds = NO;
listView.layer.shadowOffset = CGSizeMake(-3, 3);
listView.layer.shadowColor=[[UIColor blackColor] CGColor];
listView.layer.shadowRadius = 4;
listView.layer.shadowOpacity = 1.0;
[listView.layer setShouldRasterize:YES];

Il fonctionne bien, avec effet d'ombre.

Tout en changeant de

listView.layer.masksToBounds = YES;

Je n'ai pas eu l'ombre d'effet.

  • 'listView" est une UIView
InformationsquelleAutor Anbu Raj | 2012-04-30