美文网首页
2018-06-28

2018-06-28

作者: 健健锅 | 来源:发表于2018-06-28 14:17 被阅读33次

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;

    // 阴影偏移,默认(0, -3)

    theView.layer.shadowOffset = CGSizeMake(0,0);

    // 阴影透明度,默认0

    theView.layer.shadowOpacity = 0.5;

    // 阴影半径,默认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;

}

---------------------

本文来自 枫志应明 的CSDN 博客 ,全文地址请点击: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);

// 自适应label多行显示时,无需设置label高度

// make.height.mas_equalTo(40.0);

}];

---------------------本文来自 番薯大佬 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/potato512/article/details/51226586?utm_source=copy

```

相关文章

网友评论

      本文标题:2018-06-28

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