I'd like to create a simple fingerpainting feature in my app. Problem is any drawings I do to my UIView subclass view instance are erased after each drawRect call... How do you go about preserving your context drawings in your UIViews?
+1
A:
You have to add your drawings to your model and make sure your model is rendered, as appropriate, when the view is invalidated. You do not want to be drawing on the view directly without a model around to re-render it when necessary.
Jacob
TheJacobTaylor
2009-08-18 05:00:53
I was afraid you would say that...I was hoping for an easy workaround or something but I guess I've got to turn my brain on now lol...
RexOnRoids
2009-08-18 05:07:37
If I had not put my iPhone application development on hold for a little while, I would have cranked it up and done your work for you. As it is, I can only sympathize and throw a few ideas your way. :) Luck. If you start to feel too frustrated, I recommend trying to code against MS Outlook 2000. This was once aptly described by a friend as "about as much fun as sticking a fork in your eye".
TheJacobTaylor
2009-08-18 05:25:18