APP中会有一些要求,就是要给按钮加阴影达到悬浮的效果
eg:
UIButton *btn = [UIButton buttomWithType:UIButtonTypeCustom];//设置圆角btn.layer.CornerRadius = 20;//加阴影btn.layer.shadowOffset = CGSizeMake(1, 1);btn.layer.shadowOpacity = 0.8;//阴影颜色btn.layer.shadowColor = [UIColor blackColor].CGColor;新闻热点
疑难解答