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 lin开发者_StackOverflowe 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
Download sourcecode and get idea about how to create analog clock using quartz core.
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
精彩评论