iphone - CGLayer 上的 UIImage

标签 iphone ios xcode ipad ipod

我想在 CGLayer 上绘制一个简单的 UIImage,但我找不到任何有用的资源来完成它。请告诉我如何在 CGLayer 上绘制 UIImage。

谢谢!

最佳答案

这是您要找的吗?

CGContextRef layerCtx = CGLayerGetContext(layer);
 CGContextDrawImage(layerCtx, (CGRect){ CGPointZero, myImage.size }, myImage.CGImage);

关于iphone - CGLayer 上的 UIImage,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11789073/

相关文章:

iphone - Xcode - 帮助将一些代码实现到基于 View 的应用程序中?

iphone - 应用程序代码签名验证失败,iPhone

ios - xCode 4.5 git merge 无法提交或报错

ios - 此应用引用非公共(public)选择器 ... base64EncodedString dataFromBase64String

iphone - 使用 OpenCV 和 LBP 在 iPhone 上进行人脸检测

iPhone : Moving in 3D Space (stepping sideways using gluLookAt)

ios - 关于如何同时为不同的 UIView 设置动画的方法

c++ - exc_bad_access(code = 1,address = 0x1f400000010)

ios - 触摸事件不适用于 cordova 应用程序的 ios 构建

iphone - 为什么断言只是终止为 iPhone 编译的程序?