【发布时间】:2014-05-09 08:21:04
【问题描述】:
当我们编写时它工作正常: UIImage *img=[UIImage imageNamed:@"ImageName"];
但是当尝试从 nsdata 制作 uiimage 时,例如:UIImage *img = [UIImage imageWithData:imageData]; 现在,当我们尝试在 draw rect 中从 img 获取 cgimage 时,它会给出 badAccess。 如果有人知道确切的写作方式,请给我解决方案。 我使用 CGImageRef sourceImageRef = [img CGImage];在 UIView 的 Draw Rect 方法中。
【问题讨论】:
-
提供更多代码
标签: ios