Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Macman1993

macrumors 6502
Original poster
Nov 23, 2007
337
16
I've been trying to learn to draw simple shapes in Objective-c (I'm new to the language) and I am having trouble figuring it out. I just want some sample code to explain the barebones basics of drawing simple shapes (rectangles and oval's). I've found some source code from apple which I'm sure would be helpful if I understood the basics but they have so many other things going on at once that I have no idea what is necessary for drawing shapes. Can someone please point me to a simple tutorial for drawing simple shapes using the NSBezierPath class (or using something else if NSBezierPath isn't what I need).
 

lloyddean

macrumors 65816
May 10, 2009
1,047
19
Des Moines, WA
A bit dated, as it is based around earlier versions of Xcode and Interface Builder, but the code of the example is still valid.

<http://cocoadevcentral.com/d/intro_to_quartz_two/>
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.