Where and how to __bridge

前端 未结 2 1505
陌清茗
陌清茗 2020-12-02 08:34

I need some advice on __bridge-ing in iOS.

Hopefully the SSCCE1 below will explain the problem better than I can in words, but I n

2条回答
  •  醉话见心
    2020-12-02 09:11

    I'm not actually sure why this works, but I've found the solution to be:

    NSMutableArray *array = (__bridge NSMutableArray*) info;
    
    //AND
    
    CGPathApply(path, (__bridge void*)pathPoints, _processPathElement);
    

    If anyone can explain why this works and confirm that there aren't (/are) any memory leaks I'd be grateful

提交回复
热议问题