Try the search, it's linked to some great forums

Saturday, May 28, 2011

Simple UIImage transforms (scale & translate)

This snippet Moves and Scales an image.  Both actions are combined with a concatenation (CGAffineTransformConcat) function

- (void)transformMoveNScale        //performs a translation & scaling of the image
{
    CGAffineTransform transformTranslate = CGAffineTransformMakeTranslation(-330.0, 15.0);
    CGAffineTransform transformScale = CGAffineTransformMakeScale(0.5, 0.5);
    CGAffineTransform transformImage = CGAffineTransformConcat(transformScale, transformTranslate);
    [self.postCard setTransform:transformImage];
}