美文网首页ios学习iOS开发记录
iOS图片添加阴影和文字描边

iOS图片添加阴影和文字描边

作者: 静花寒 | 来源:发表于2015-12-18 11:40 被阅读3549次

//添加阴影

UIimageView *imageView = [[UIImageView alloc ] init];

imageView.layer.shadowColor = [UIColor blackColor].CGColor;

imageView.layer.shadowOffset = CGSizeMake(3,2);

imageView.layer.shadowOpacity = 0.6;

imageView.layer.shadowRadius = 1.0;

imageView.clipsToBounds = NO;

//文字描边

只设置shadowColor,不设置shadowOffset就可以实现描边效果

相关文章

网友评论

本文标题:iOS图片添加阴影和文字描边

本文链接:https://www.haomeiwen.com/subject/umpphttx.html