9

uiview 实现阴影效果

 3 years ago
source link: http://quangelab.com/view-shadow/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
uiview 实现阴影效果 – ruquan.z – github技术博客,成长在于积累。

ruquan.z

github技术博客,成长在于积累。

Blog About

uiview 实现阴影效果

阴影可能对于ui来讲是常用的一种效果,可以让UI切图实现,当然也可以用几句代码实现,下面我们就用几行代码来实现UI控件的阴影效果

[[self.m_pEditView layer] setShadowOffset:CGSizeMake(0, 3)];//位移
[[self.m_pEditView layer] setShadowRadius:3];//阴影半径
[[self.m_pEditView layer] setShadowOpacity:1];//不透明度
[[self.m_pEditView layer] setShadowColor:[UIColor blackColor].CGColor];//颜色
Written on February 8, 2015

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK