码迷,mamicode.com
首页 >  
搜索关键字:maskstobounds    ( 52个结果
UI开发学习中遇到的问题汇总
1.给UIView设置圆角,边框,阴影绘制,需要使用layer1)设置圆角cornerView.layer.cornerRadius = 20; //设置试图圆角的大小cornerView.layer.masksToBounds = YES //防止子元素溢出父试图将一个正方形设置成圆形,代码为.....
分类:其他好文   时间:2016-01-14 22:20:46    阅读次数:317
layer设置圆角,边框,阴影
1.绘制圆角cornerView.layer.cornerRadius = 20; //设置试图圆角的大小cornerView.layer.masksToBounds = YES //防止子元素溢出父试图将一个正方形设置成圆形,代码为:cornerView.layer.cornerRadius .....
分类:其他好文   时间:2016-01-14 16:11:06    阅读次数:357
IOS UIView圆角,阴影,边框,渐增光泽
圆角sampleView.layer.cornerRadius = 2.5; // 圓角的弧度sampleView.layer.masksToBounds = YES;阴影sampleView.layer.shadowColor = [[UIColor blackColor] CGColor];sa...
分类:移动开发   时间:2016-01-09 20:04:04    阅读次数:197
设置圆角代码
//设置图片框为圆角 ImgView.layer.cornerRadius = 7; ImgView.layer.masksToBounds = YES;//设置图片框为圆角 ImgView.layer.cornerRadius = 7; ImgView.layer.masksToBounds = ...
分类:其他好文   时间:2015-11-29 00:48:55    阅读次数:102
UIView圆角设置
对于UIview的圆角设置最简单的就是layer的两个属性分别是cornerRadius和masksToBounds,但是对于设置其中某一个角为圆角的时候需要使用贝塞尔曲线UIView *aView = [[UIView alloc] init];aView.frame = CGRectMake(0...
分类:其他好文   时间:2015-11-20 19:15:03    阅读次数:112
设置Label的圆角效果
设置Label的圆角效果// 设置Label为圆角// 设置四周圆角的半径lblMsg.layer.cornerRadius = 5;// 把多余的部分裁剪掉。lblMsg.layer.masksToBounds = YES;
分类:其他好文   时间:2015-11-05 22:05:04    阅读次数:238
iOS阴影
但是如果把masksToBounds设置为yes就没有阴影了UIButton*view=[[UIButtonalloc]initWithFrame:CGRectMake(100,100,100,100)];view.backgroundColor=[UIColorredColor];view.lay...
分类:移动开发   时间:2015-09-23 16:25:05    阅读次数:170
CALayer的用法
UIView*view=[[UIViewalloc]initWithFrame:CGRectMake(100,100,100,100)];view.backgroundColor=[UIColorredColor];//设置圆角view.layer.cornerRadius=10;view.layer.masksToBounds=YES;//.设置边框view.layer.borderWidth=5;view.layer.borderColor=[UIColorgreenColor].CGCo..
分类:其他好文   时间:2015-09-16 16:00:53    阅读次数:134
iOS 设置控件圆角及边框
1. 设置圆角:self.view.layer.masksToBounds = YES;self.view.layer.cornerRadius = 10.0f;2. 添加边框:self.layer.borderWidth = 5.0f;self.layer.borderColor = [[UICo...
分类:移动开发   时间:2015-08-17 23:09:22    阅读次数:151
UIImageView 圆角设置
imgLogo.layer.masksToBounds= YES; //设置在layer之下的都盖住 imgLogo.layer.cornerRadius = imgLogo.bounds.size.width*0.5; //设置layer的圆角,是自身宽度的一半 imgLogo.layer.bo....
分类:其他好文   时间:2015-07-28 12:38:40    阅读次数:106
52条   上一页 1 2 3 4 5 6 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!