https://www.cnblogs.com/isItOk/p/5648283.html
https://blog.csdn.net/lee_nacl/article/details/61419606
https://blog.csdn.net/yearn520/article/details/6729426? ? ? KMP NEXT
https://blog.csdn.net/wsyx768/article/details/80859990? ? ?//陰影
```
/// 添加四邊陰影效果
- (void)addShadowToView:(UIView *)theView withColor:(UIColor *)theColor {
? ? // 陰影顏色
? ? theView.layer.shadowColor = theColor.CGColor;
? ? // 陰影偏移抽高,默認(rèn)(0, -3)
? ? theView.layer.shadowOffset = CGSizeMake(0,0);
? ? // 陰影透明度,默認(rèn)0
? ? theView.layer.shadowOpacity = 0.5;
? ? // 陰影半徑透绩,默認(rèn)3
? ? theView.layer.shadowRadius = 5;
}
- (void)addShadowToView:(UIView *)theView withColor:(UIColor *)theColor {
? ? theView.layer.shadowColor = theColor.CGColor;
? ? theView.layer.shadowOffset = CGSizeMake(0,0);
? ? theView.layer.shadowOpacity = 0.5;
? ? theView.layer.shadowRadius = 5;
? ? // 單邊陰影 頂邊
? ? float shadowPathWidth = theView.layer.shadowRadius;
? ? CGRect shadowRect = CGRectMake(0, 0-shadowPathWidth/2.0, theView.bounds.size.width, shadowPathWidth);
? ? UIBezierPath *path = [UIBezierPath bezierPathWithRect:shadowRect];
? ? theView.layer.shadowPath = path.CGPath;
}
---------------------
本文來(lái)自 楓志應(yīng)明 的CSDN 博客 翘骂,全文地址請(qǐng)點(diǎn)擊:https://blog.csdn.net/wsyx768/article/details/80859990?utm_source=copy
label4.preferredMaxLayoutWidth = (WidthScreen -10.0*2);
[label4 setContentHuggingPriority:UILayoutPriorityRequiredforAxis:UILayoutConstraintAxisVertical];
label4.numberOfLines =0;
[label4 mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(10.0);
make.right.mas_equalTo(-10.0);
make.top.mas_equalTo(currentView.mas_bottom).offset(10.0);
// 自適應(yīng)label多行顯示時(shí)壁熄,無(wú)需設(shè)置label高度
// make.height.mas_equalTo(40.0);
}];
---------------------本文來(lái)自 番薯大佬 的CSDN 博客 ,全文地址請(qǐng)點(diǎn)擊:https://blog.csdn.net/potato512/article/details/51226586?utm_source=copy
```