I've been doing research all morning. No luck so far. I'm trying to rotate a CGPoint around the center of my view.
Here's what I do for UIBezierPath:
CGRect bounds = self.bounds; // might want to use CGPathGetPathBoundingBox
CGPoint center = CGPointMake(CGRectGetMidX(bounds), CGRectGetMidY(bounds));
CGAffineTransform transform = CGAffineTransformIdentity;
transform = CGAffineTransformTranslate(transform, center.x, center.y);
transform = CGAffineTransformRotate(transform, DEGREES_TO_RADIANS(degreesOfRotation));
transform = CGAffineTransformTranslate(transform, -center.x, -center.y);
currentLayer.path = CGPathCreateCopyByTransformingPath(pathTwo.CGPath, &transform);
It work's great. I found this post What is the best way to rotate a CGPoint on a grid? and it just didn't work.
I really need a way to rotate CGPoint around the center of my bounds.
Any ideas?