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 变量传递给 performSelectorOnMainThread 用 valueWithPointer 将它包装在 NSValue 中就足够了吗?
CGImageRef 的类型是什么? 它是c指针的typedef吗?
谢谢
CGImageRef是指向CGImagec-struct 的指针。对于您的情况,只需将其转换为 id 类型就足够了:
CGImageRef
CGImage
[obj performSelectorOnMainThread:someSEL withObject:(id)cgImageRef];