Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Core graphics and UIKit interaction

Hey all, I'm am trying to make a very interactive UI with lots of animations and effects.

But I don't know if:

  1. Core graphics can support user interaction (touches, drags, etc)

  2. Core graphics supports object rotation

  3. Core graphics can interact with UIKit and Core Animation in any way

Thanks!

like image 826
Daniel says Reinstate Monica Avatar asked Nov 28 '25 00:11

Daniel says Reinstate Monica


1 Answers

Assuming you are talking about iPhone not Mac (because of mention of touches).

1) CoreGraphics is mostly associated with drawing of images. User interaction is via your view and the touches* member functions. Within the view's drawRect function, you can use CoreGraphics to do custom drawing.

2) Yes, you can get rotation, but easiest way is to set the transform property using a CGAffineTransformMakeRotation. Drop down to the layer and you can even use 3d transforms (which is I think how they do stuff like cover flow).

3) See #1.

like image 193
DavidN Avatar answered Dec 01 '25 03:12

DavidN