-1

I draw some screenColor gradient with - (void)drawRect:(CGRect)rect I want not draw it on full screen except selected frame. Is it possible to do or what is the faster way to accomplish it?

rmaddy
  • 314,917
  • 42
  • 532
  • 579

1 Answers1

1

Before you draw the gradient, set a clipping path on your graphics context.

https://developer.apple.com/library/ios/documentation/graphicsimaging/Conceptual/drawingwithquartz2d/dq_paths/dq_paths.html#//apple_ref/doc/uid/TP30001066-CH211-TPXREF126

matt
  • 515,959
  • 87
  • 875
  • 1,141