setNeedsDisplay:True not redrawing unless activated?
I have a custom view that is a subview of the main window. I have a timer that fires a [self setNeedsDisplay:TRUE] that will update drawing on the view. But from what I can see, if I leave the application on the background and switch to another, it does not 开发者_JAVA技巧reflect the new drawing functions until I click again on the application. What could I be missing? Thank you, Jose.
setNeedsDisplay
will not fire if it thinks the user cant see what its drawing for obvious reason. This includes, offscreen and obscured views even when the app is running.
In an app where you might be drawing data over time you would draw all the relevant data while backgrounded out at once when the app resumes.
精彩评论