UIView圆角
2015-11-17 23:39
477 查看
在实际的应用中,总感觉圆角的东西比较好看, 像button,label,image等等,以前的时候我就经常给那些控件添加一个UIImageView作为背景,再搞张圆角的图片
其实的viewT是UIView的实例,当然也可以是他的子类实例哈。
最后别忘记添加QuartzCore.framework这个库,还有在你的文件中包含#import <QuartzCore/QuartzCore.h>
viewT.layer.cornerRadius = 10;//设置那个圆角的有多圆 viewT.layer.borderWidth = 10;//设置边框的宽度,当然可以不要 viewT.layer.borderColor = [[UIColor redColor] CGColor];//设置边框的颜色 viewT.layer.masksToBounds = YES;//设为NO去试试
其实的viewT是UIView的实例,当然也可以是他的子类实例哈。
最后别忘记添加QuartzCore.framework这个库,还有在你的文件中包含#import <QuartzCore/QuartzCore.h>
相关文章推荐
- EasyUI 在mvc中的引入与使用
- UILabel的各种属性与方法的使用
- 解决dpkg: ../../src/packages.c:227: process_queue: Assertion `dependtry <= 4' failed
- UISlider
- 王学岗属性动画上(四)------ValueAnimator的应用
- LeetCode Longest Increasing Subsequence DP
- ios8 UITableView设置 setSeparatorInset:UIEdgeInsetsZero不起作用的解决办法
- Lesson2.2 & 2.3 Maya command reference & quick help
- LeetCode303——Range Sum Query - Immutable
- {Effective Java} Quick Guide
- 20151117《Unix环境高级编程》文件apue.h的获取与使用
- Quicksort
- duilib 如果获取listui 当前选择的项GetCursel
- 线段树(updata+query)
- LXC+PBS+集群调度 msg: 'Bad UID for job execution MSG=connection to mom timed out'
- UI Button
- UI_UITextField_UIButton
- Android源码阅读与理解(二):Android系统Build流程详解
- UI基础__ NSMutableAttributedString
- UIAlertController UIAlertAction (UIAlertView, UIActionSheet)(最好)