Created
April 10, 2013 16:32
-
-
Save C4Tutorials/5356221 to your computer and use it in GitHub Desktop.
Rotating with an offset anchorPoint
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// C4WorkSpace.m | |
// | |
// Created by Travis Kirton | |
// | |
#import "C4WorkSpace.h" | |
@implementation C4WorkSpace | |
-(void)setup { | |
C4Image *img1 = [C4Image imageNamed:@"C4Sky"]; | |
C4Image *img2 = [C4Image imageNamed:@"C4Table"]; | |
img1.width = 180; | |
img2.width = 180; | |
img2.anchorPoint = CGPointMake(-1.0f,0.5f); | |
img1.center = self.canvas.center; | |
img2.center = self.canvas.center; | |
[self.canvas addObjects:@[img1,img2]]; | |
img1.rotation = QUARTER_PI; | |
img2.rotation = QUARTER_PI; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment