Using this formula, I got the angle
double rotateAngle = atan2(y,x)
with this code i can draw a rectangle
CGRect rect = CGRectMake(x,y , width ,height); CGContextAddRect(context, rect); CGContextStrokePath(context);
How can I rotate a rectangle around a corner?
user1125890
source share