Last active
December 15, 2015 07:09
-
-
Save ginrou/5221332 to your computer and use it in GitHub Desktop.
UILabelを回転
This file contains 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
- (void)rotateLabel:(UILabel* )label | |
{ | |
CGAffineTransform transform = CGAffineTransformMakeRotation(M_PI_2); // 90度回転 | |
// アニメーションなしで回転 | |
label.transform = transform; | |
// 3.0[sec]かけて回転 | |
[UIView animateWithDuration:1.0 animations:^{ | |
label.transform = transform; | |
}]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment