Well, my point is that checking to see if a key exists in the prefs, and then writing a default value of that key if needed, etc, are things that you don't want to do inside drawRect. All that logic can be done when the view is loaded (or when the user selects something from the tableview).
That really should all be taken care of and an UIImage loaded from flash (like your last line you posted) *before* this point.
Then go about your custom drawing (and nothing else) in drawRect.
|