0

I'm working on an app that has a large scrolling wheel - see here: http://aspyreapps.com/Files/Aspyre/wheels.jpg

The content inside the wheel needs to be dynamically created, rather than a static graphic. The problem is that I need the content to behave like a wheel, so as the wheel turns the angle of the content changes accordingly - not just moves straight up and down.

Any suggestions on how I might accomplish something like this?

Ben Williams
  • 4,695
  • 9
  • 47
  • 72

2 Answers2

0

The easiest is to detect gestures for a custom UIView where you draw the text area dynamically using Core Graphics. You can easily rotate elements using the following code in your custom UIView:

- (void)drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextRotateCTM(context, M_PI / 4);

...

NSString* text = @"Hello";
[text drawAtPoint:point withFont:font];
}
Resh32
  • 6,500
  • 3
  • 32
  • 40
0

Affine transform rotate with offset of the center point. Don't know how to do that of the top of my head, but found something that might help here:

Affine transform around a point

Community
  • 1
  • 1