Rotating a UIImageView around the bottom axis - Objective-C/iOS?

You've got few things wrong in your code First I have no idea why do you set boxView. Center to (0.5, 1). Second you shouldn't set anchor point inside animation block and third M_PI_2 is just half animation you really want Here is the solution.

I used UILabel instead of UIImageView UILabel *testLabel = UILabel alloc initWithFrame:CGRectMake(20, 20, 100, 100) autorelease; testLabel. BackgroundColor = UIColor blackColor; testLabel. Text = @"Test"; testLabel.

TextColor = UIColor whiteColor; self. View addSubview:testLabel; testLabel.layer. AnchorPoint = CGPointMake(0.5, 1); UIView animateWithDuration:1.0 delay:0.0 options:UIViewAnimationOptionCurveEaseInOut | UIViewAnimationOptionAllowUserInteraction animations:^{ testLabel.layer.

Transform = CATransform3DMakeRotation(M_PI, -1, 0, 0); } completion:^(BOOL finished) { }.

You've got few things wrong in your code. First I have no idea why do you set boxView. Center to (0.5, 1).

Second you shouldn't set anchor point inside animation block and third M_PI_2 is just half animation you really want. Here is the solution. I used UILabel instead of UIImageView.

UILabel *testLabel = UILabel alloc initWithFrame:CGRectMake(20, 20, 100, 100) autorelease; testLabel. BackgroundColor = UIColor blackColor; testLabel. Text = @"Test"; testLabel.

TextColor = UIColor whiteColor; self. View addSubview:testLabel; testLabel.layer. AnchorPoint = CGPointMake(0.5, 1); UIView animateWithDuration:1.0 delay:0.0 options:UIViewAnimationOptionCurveEaseInOut | UIViewAnimationOptionAllowUserInteraction animations:^{ testLabel.layer.

Transform = CATransform3DMakeRotation(M_PI, -1, 0, 0); } completion:^(BOOL finished) { }.

Thanks, That has started to clear things up, but for some reason it seems to still rotate about 20%/20px from the baseline. Would a navigation controller have any effect on the coordinates? – Designer023 Sep 23 at 20:34 ps I was using M_PI_2 because I was going to swap images at the hight point.

Perhaps that is't the best way! – Designer023 Sep 23 at 20:35 Oh I see. 20% is a mystery.

I have no Idea why it's doing it. The code I sent works just fine in my project. – Split 23 Sep at 23:18 Thanks for trying.It's got me closer than I was before :D – Designer023 Sep 24 at 11:46.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions