0

I am editing my question... what should i do if i want to draw a line in image by using CALAyer.

i want to draw a line inside the circle(circular image).

Example:- One point of the line will be the radius of the line and the other should be the end point of the cirlce(Like analog clock).As the campass of the iphone will move the line should move(like second hand in clock).

Please anyone help me.how to do this

Thanks in advance

ios developer
  • 3,363
  • 3
  • 51
  • 111

2 Answers2

1

Download sourcecode and get idea about how to create analog clock using quartz core.

Janak Nirmal
  • 22,706
  • 18
  • 63
  • 99
1
UIGraphicsBeginImageContext(circleSize);
[chartView.image drawInRect:CGRectMake(0, 0, circleSize.width, circleSize.height)];

// code to draw

chartView.image=UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();   

from this code u can redraw the same picture

EmptyStack
  • 51,274
  • 23
  • 147
  • 178
jothikenpachi
  • 656
  • 6
  • 12