1

I have;

CGContextRef context = UIGraphicsGetCurrentContext();

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

4

1 回答 1

4

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

self.frame.size.width
self.frame.size.height
于 2009-07-26T19:17:46.030 回答