Frage

I use ABUITableViewCell and draw all content manually. Also I use CGContextClip to make rounded corners, all works great, but when I tried to draw another image outside clip rect it hasn't been displayed.

When I draw NSString I use CGContextSaveGState(context) function and text will be shown. But the image is not.

How to draw image after CGContextClip?

War es hilfreich?

Lösung

You should store the state and then make sure you restore it afterward. Just draw the image after the CGContextRestoreGState.

If that's already what you're describing, then you may just be drawing the image in the wrong place.

You should make sure all save state calls you make are balanced by restores.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top