How do I create a mutable array of CGImageRefs?

后端 未结 3 1099
眼角桃花
眼角桃花 2020-12-21 01:21

I want to keep a mutable collection of CGImageRefs. Do I need to wrap them in NSValue, and if so how do I wrap and unwrap them properly? Can I get away with using a C array?

3条回答
  •  难免孤独
    2020-12-21 02:12

    You can directly add CGImage to NSMutableArray. You will need to cast to (id) to avoid compiler warnings.

    CFType is bridged to NSObject. You can send any message NSObject responds to to any CFType. In particular, -retain and -release work as normal.

提交回复
热议问题