CGMutablePathRef to NSMutableArray

后端 未结 2 1866
花落未央
花落未央 2021-01-26 15:32

How to add CGMutablePathRef to NSMutableArray?

2条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-26 16:07

    CGMutablePath path = <... your path ...>;
    [mutableArray addObject:(id)path];
    

    CGPath and CGMutablePath are just opaque CFType object types, and those can be added (via casting to id) to any Cocoa container classes that are toll-free bridged to their CoreFoundation counter-parts.

提交回复
热议问题