Generally, you don't call -lockFocus on a view unless you have a very
good reason. As you've already found out, -lockFocus will raise
exceptions if things aren't set exactly right. Instead, you do all
your drawing in -drawRect:, and call -setNeedsDisplay: & friends when
you need to refresh part of the view.