设置UIView的简单阴影效果

1     UIView *containerView = [[[UIView alloc] initWithFrame:CGRectMake(20, 20, 280, 300)] autorelease];
2     containerView.backgroundColor = [UIColor clearColor];
3     containerView.layer.shadowOffset = CGSizeMake(0, 2);
4     containerView.layer.shadowOpacity = 0.80;

 

posted @ 2013-02-09 10:24  diablo大王  阅读(6282)  评论(0编辑  收藏  举报