Demo2\aa\src\main\res\drawable\bg_border.xml1 2 3 4 5 6 7 Demo2\aa\src\main\res\drawable\bg_border2.xml 1 2 4 5 10 11 ...
分类:
其他好文 时间:
2015-07-23 23:24:16
阅读次数:
167
在项目中我们会经常遇到这种圆角效果,因为直角的看起来确实不那么雅观,可能大家会想到用图片实现,试想上中下要分别做三张图片,这样既会是自己的项目增大也会增加内存使用量,所以使用shape来实现不失为一种更好的实现方式。在这里先看一下shape的使用: ...
分类:
移动开发 时间:
2015-07-23 13:28:10
阅读次数:
208
有的时候需要将图片现实为圆形
比如头像等
以下面的图片为例
我们按照正常的方式添加后效果如下
UIImageView *userIconImageV=[[UIImageView alloc]initWithFrame:CGRectMake(30, 120, 188, 188)];
[self.view addSubview:u...
分类:
移动开发 时间:
2015-07-23 11:57:10
阅读次数:
138
self.label1.layer.borderWidth=1;//边框宽度 //self.label1.layer.cornerRadius=5;//边框圆角 CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); C...
分类:
其他好文 时间:
2015-07-23 11:55:38
阅读次数:
98
-(void)addRoundBorder:(UIView *)view{ CAShapeLayer * acircle = [CAShapeLayer layer]; acircle.path = [UIBezierPath bezierPathWithRoundedRect:view...
分类:
其他好文 时间:
2015-07-22 20:45:39
阅读次数:
102
testcss3 border-radius 属性允许您向元素添加圆角 This is a heading. This is paragraph. This is paragraph. This is paragraph. This is paragraph. This is par...
分类:
Web程序 时间:
2015-07-22 20:27:18
阅读次数:
143
1. 在res目录下的drawable目录下新建shape.xml文件
<padding
android:bo...
分类:
移动开发 时间:
2015-07-22 14:39:33
阅读次数:
117
首先呢,我们还是看几个示图:这种带有圆角的listview' 看起来很棒吧,确实是这样,其实也不能这么说,主要方形太多了,斯通见惯就不值钱了,“物以稀为贵嘛”. 就好比学java都搞androd,很明显嘛,为了多赚点钱,可是供过于求的话,就不这么乐观了,就好比现在这个圆角,如果太多太多的话,我想若干...
分类:
移动开发 时间:
2015-07-20 12:24:53
阅读次数:
204