jon*_*len 22 xcode objective-c uiimageview uiimage ios
我有一个联系人列表的uitableview.我希望将每个联系人的图像放在圆圈框架中,就像在小牛队的登录屏幕中一样.有关如何在uitableviewCell中执行此操作的任何建议?
Mir*_*ano 76
我猜你在你的Cell里面有你的imageView,所以你刚刚要做的就是使用一个看不见的边框.使用此代码可以实现此效果:
cell.yourImageView.layer.cornerRadius = cell.yourImageView.frame.size.height /2;
cell.yourImageView.layer.masksToBounds = YES;
cell.yourImageView.layer.borderWidth = 0;
Run Code Online (Sandbox Code Playgroud)
您的UIImageView必须具有相同的高度和宽度,您还必须在项目中导入quartzCore框架
归档时间: |
|
查看次数: |
24197 次 |
最近记录: |