I’m working an app for drawing.
I’m collecting the strokes as points and draw those points into the drawRect method of my UIView subclass.
I collect the point by overriding touchesBegan, touchesMoved and touchesEnded.
In all this those methods I call [self setNeedsDisplay] and i expect to see the strokes in realtime… it doens’t happen, acutally the drawRect methods is called only after touchesEnded
I need a way to do not simply mark a view as discarded but i need acutally to force the system to perform the drawRect call.
Any idea ?
Is it possible you’re calling setNeedsDisplay on your viewcontroller (self) and not the view (self.view)?
Also you should probably use setNeedsDisplayInRect to only update the part of the view that changes during the touch.