Is there any way by which it is possible to uniquely identify CGContextRef?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A
CGContextRefis just a pointer to aCGContextstruct. Because it’s a pointer you can just use equality to check if they’re the same context: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: