I have a custom view in a window, set as an instance of MyView, and
connected to my controller as an IBOutlet theView. When I do this in
the controller's awakeFromNib method:
[theView lockFocus];
Out of curiosity, why are you locking focus on a view in -awakeFromNib?