`
zani
  • 浏览: 350132 次
  • 性别: Icon_minigender_1
  • 来自: 福州
社区版块
存档分类
最新评论

Create rounded UIViews with shadow

 
阅读更多

[roundedView setBackgroundColor:[UIColor blackColor]];
 
	[[roundedView layer] setCornerRadius:8];
	[[roundedView layer] setMasksToBounds:NO]; 
	[[roundedView layer] setShadowColor:[UIColor blackColor].CGColor];
	[[roundedView layer] setShadowOpacity:1.0f];
	[[roundedView layer] setShadowRadius:6.0f];
	[[self layer] setShadowOffset:CGSizeMake(0, 3)];
 

关键是要把 maskstobounds设置为NO

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics