How can I take an UIImage and give it a black border?(如何获取 UIImage 并给它一个黑色边框?)
问题描述
如何设置 UIImage
的边框?
推荐答案
使用 OS > 3.0 你可以这样做:
With OS > 3.0 you can do this:
//you need this import
#import <QuartzCore/QuartzCore.h>
[imageView.layer setBorderColor: [[UIColor blackColor] CGColor]];
[imageView.layer setBorderWidth: 2.0];
这篇关于如何获取 UIImage 并给它一个黑色边框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!