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];
}

Wednesday, May 25, 2011

iPad in Landscape only

// Allows the program to only run in landscape
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) ||
    (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}

Saturday, May 14, 2011