I removed the dodraw() reference from the draw method and placed it in one of the methods in GameViewController. Not surprisingly, it worked fine there: I put the method in a mouse routine and moving the mouse caused the drawing to take place.
I guess that Swift is implacable about keeping methods in view controllers from being accessed from a different class.
I will look into delegation.
Topic:
Programming Languages
SubTopic:
Swift
Tags: