A: 

Please read the documentation on Quartz 2D library that will let you draw the basic shapes and more.

Ram
Thanks, but why it does't draw in my case ?
Lukas Šalkauskas
You might have to get the correct Device GraphicsContext and draw to that graphics context, there are few of them available
Ram
Brad is right, you need to override drawRect method and call setNeedsDisplay when you need the view to repaint itself
Ram
+6  A: 

All custom drawing for a UIView needs to be done within its -drawRect: method. You'll need to subclass UIView, move everything from line 41 through 50 into that method in the subclass, and create a boolean property on that subclass which controls whether or not the circle gets drawn. Within your controller code above, you'll need to set the new property to YES and call -setNeedsDisplay on your UIView to trigger a redraw of the view, leading to your circle being displayed.

Alternatively, you could create a UIView subclass that always draws the circle, and just add and remove it from your controller's main view as needed.

Brad Larson
Thanks, I will try to do that.
Lukas Šalkauskas
Still can't make it... :S I'm totaly new to this kind of development idiology, also i'm new to objective-c. Maybe you could give me some example code. I could send mine code to you if you'll give me your contacts.
Lukas Šalkauskas
A: 

Hmm I can't understand how to do that...

Maybe anyone can explain (In very detailed way) me every step by step strating with creation of new project ?

Lukas Šalkauskas
A: 

Try watching the two part lecture series to see how to draw to a UIView:

http://www.myiphoneadventure.com/?p=98

statikfx