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

来源:互联网 发布:putty向串口发送数据 编辑:程序博客网 时间:2024/05/16 05:05

//添加阴影

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就可以实现描边效果

原创粉丝点击