Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/107.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 为UIImage创建彩色角点_Ios_Objective C - Fatal编程技术网

Ios 为UIImage创建彩色角点

Ios 为UIImage创建彩色角点,ios,objective-c,Ios,Objective C,对于我的UITableView,我制作的图像是圆形的。我就是这样做的: cell.imageView.image = image; cell.imageView.layer.cornerRadius = 33; cell.imageView.clipsToBounds = YES; cell.separatorInset = UIEdgeInsetsMake(0, 82, 0, 0); 很简单。我想要的是,为那个图像创建一个彩色的角点。请在附件处领取战利品: 在左边

对于我的UITableView,我制作的图像是圆形的。我就是这样做的:

   cell.imageView.image = image;
   cell.imageView.layer.cornerRadius = 33;
   cell.imageView.clipsToBounds = YES;
   cell.separatorInset = UIEdgeInsetsMake(0, 82, 0, 0);
很简单。我想要的是,为那个图像创建一个彩色的角点。请在附件处领取战利品:

在左边,是图像现在的样子。在右侧,我希望添加带有角的图像。我怎么能这样做


任何建议都将不胜感激,谢谢

在黑暗中拍摄,但你可以尝试设置

cell.imageView.layer.borderWidth = 3.0;

cell.imageView.layer.borderColor = [UIColor redColor].CGColor;

为什么不在图像后面画一个圆圈呢?这是一个选项:)只需将
[UIColor redColor]
更改为
[[UIColor redColor]CGColor]
:)