DrawFun w/ Xcode 7 - initWithFrame (not drawing)


In case anyone else runs into this -

On the first exercise, I was trying to get the random point drawing to work, but only got the green view - no lines. I realized initWithFrame wasn’t being called. Testing, I found that initWithCoder was being called.

I’m not sure if this is an appropriate “solution,” but if you check out the nib’s File Inspector settings under “runtime behavior,” there’s a box for “prefer coder.” If you uncheck it, you’re back to preferring initWithFrame and can continue with the exercise. (otherwise, stick with initWithCoder and move your drawing setup into a common method both inits could call)