I'm trying to do something like the attached image.
I thought this page would lead to the answer
http://www.informit.com/articles/article.aspx?p=2149190&seqNum=13
or
but converting objC to swift is troublesome. I can easily draw my arrows but getting the NSString to rotate then translate is problematic. It does weird things like drawing off screen, wrong angles, etc.
I've tried this and many variations
CGContextSaveGState(context)
CGContextRotateCTM(context, dTheta[i])
CGContextTranslateCTM(context, -s.sizeWithAttributes(attributes).width / 2.0, -radiusY )
s.drawAtPoint(CGPoint(x: x + xOffset*0.0 , y: y + yOffset*0.0 ), withAttributes: attributes)
//s.drawAtPoint(CGPointMake(0, 0), withAttributes: attributes)
CGContextRestoreGState(context)
Think about what you want to do: draw a string some distance from the center of the circle, rotated about the center of the circle. So, it'd be handy to think of the center of the circle as the origin. I'd do the following:
{d, 0}
(whered
is the distance from the center where the text should start.