CocoaDev

Edit AllPages

I implemented this code into a very simple application, but still can’t get any results. “vue” is my NSView where I want the path to be drawn. That piece of code doesn’t deliver any result. Can anyone give me a clue ?

}

I also want to make the NSView draw itself ONLY when the user presses a button.


For the button thingie, see -setNeedsDisplay: in NSView.

– PerSquare


Okay, I think I was not precise enough. I want a button to draw a line, another one to draw a rectangle, and another one to draw a circle. How do I implement the drawRect: method to make a different drawing for each button ?


Hmm, you really don’t do that in drawRect: in general. I suggest you:

Read up om ModelViewController and check out the examples (on your HD)

in that order.

Good luck, PerSquare