开发者

How do I uniquely identify cgcontext?

Is there a开发者_StackOverflow社区ny way by which it is possible to uniquely identify CGContextRef?

Thanks


A CGContextRef is just a pointer to a CGContext struct. Because it's a pointer you can just use equality to check if they're the same context:

if( context1 == context2 )
{
    //the contexts are the same
}

If you need to keep track of particular contexts, just store a reference to them, in an ivar or other variable. You can then use equality to check if a context matches:

if( someContext == yourContextIvar )
{
    //the contexts are the same
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜