Is there an optimal way to render images in cocoa? Im using setNeedsDisplay
        Posted  
        
            by 
                Edward An
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Edward An
        
        
        
        Published on 2009-08-17T15:11:10Z
        Indexed on 
            2014/06/07
            21:25 UTC
        
        
        Read the original article
        Hit count: 300
        
Currently, any time I manually move a UIImage (via handling the touchesMoved event) the last thing I call in that event is [self setNeedsDisplay], which effectively redraws the entire view.
My images are also being animated, so every time a frame of animation changes, i have to call setNeedsDisplay.
I find this to be horrific since I don't expect iphone/cocoa to be able to perform such frequent screen redraws very quickly.
Is there an optimal, more efficient way that I could be doing this? Perhaps somehow telling cocoa to update only a particular region of the screen (the rect region of the image)?
© Stack Overflow or respective owner