You can use the NSTimer class to simulate a simple animation by continuously changing the position of the Image View, but you can also use the transformation techniques supported by the iOS SDK to achieve the same effect.
Transforms are defined in Core Graphics (a C-based API that is based on the Quartz advanced drawing engine; you use this framework to handle things such as drawings, transformations, image creation, etc.), and the iOS SDK supports standard affine 2D transforms. You can use the iOS SDK to perform the following affine 2D transforms:
NOTE An affine transformation is a linear transformation that preserves co-linearity and ratio of distances. This means that all the points lying on a line initially will remain in a line after the transformation, with the respective distance ratios between them maintained.
Figure 13-7 shows the effects of the various transformations.
To perform an affine transform on a view, simply use its transform property. Recall that in the previous example, you set the new position of the view through its center property:
imageView.center = CGPointMake(imageView.center.x + delta.x, imageView.center.y + ...