UIImageView 使图片圆形的方法
2015-08-09 14:16
337 查看
UIImageView 圆形的两种方法
1、cornerRadius (tableView,collectionView尽量避免使用,影响性能)
//想要圆角 cornerRadius必须是 imageview高的一半
imageView.layer.cornerRadius = imageView.frame.size.height/2;
imageView.layer.masksToBounds = YES;
2、图片本身就是圆形
1、cornerRadius (tableView,collectionView尽量避免使用,影响性能)
//想要圆角 cornerRadius必须是 imageview高的一半
imageView.layer.cornerRadius = imageView.frame.size.height/2;
imageView.layer.masksToBounds = YES;
2、图片本身就是圆形
相关文章推荐
- UVa - 424 Integer Inquiry
- easyui的datagrid使用以及分页
- easyui的dnd插件实现datagrid行拖拽
- MySQL中的UUID
- UE4发报机-关卡蓝图调用蓝图类的发报机
- hdu3530Subsequence rmq
- Chrome开发工具Network没有显示完整的http request和response对话
- GameBuilder见缝插针游戏开发系列(AA)
- 黑马程序员——Java GUI(图形用户界面)
- 对于用js获取元素的css样式属性(getComputedStyle,currentStyle,style)(getPropertyValue,getAttribute)
- Arduino 软重启 软件reset
- POJ 3368 Frequent values
- UIImageView和UIImage
- UITextField
- 系统签名 sharedUserId android.uid.system
- UILabel
- UIWindow
- Xcode5 创建模板和UIView 关联XIB
- UIButton
- JAVA GUI