iphone - How can I get -drawRect to execute? -


I'm calling the drawRect method in UIView from a View Controller class. I have an object of the UIView class and I [Object] Setredes display] using drawRect method. The problem I have is that when I call this function, the branches are not running in this ceremony. It first performs the viewing function in the controller and then executes the function in the UIView class. Can anyone help me how the branches in the UIView category and then the whole View Controller Class Execution

thanks

-setNeedsDisplay only invalidates rectangle of the scene next time Next time the graphics system will come to the screen, then ask to recreate the scene itself. How this painting works just in the properly prepared application, you really should not pay attention when drawing is done. Or put another way, if you keep in mind while painting, then your app needs some work.

If you tell us why you need drawing at a particular time, then maybe we can help you to work around it. .

Comments