CharlesS
CharlesS

Reputation: 1591

How do I get the size of an Iphone context

I have;

CGContextRef context = UIGraphicsGetCurrentContext();

Now I want to know the width/height of the the context (in pixels); any way to do this?

Upvotes: 1

Views: 1413

Answers (1)

vog
vog

Reputation: 25607

You can't get that information from the CGContextRef object, but from the surrounding frame object:

self.frame.size.width
self.frame.size.height

Upvotes: 4

Related Questions