Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我用图像文件名提供图像浏览器视图,它管理加载它们。
有没有办法在加载它们后从浏览器中检索这些图像的 CGImageRef ?当用户单击图像时,我想用它们做一些核心动画。
可能最简单的方法是使用 NSView 方法
-bitmapImageRepForCachingDisplayInRect:
为该区域构建一个 NSBitmapImageRep,然后
-cacheDisplayInRect:toBitmapImageRep:
画进去,然后是 NSBitmapImageRep 的
-CG图像
方法来获取 CGImageRef。