重複の可能性:
NSStringを斜めに描画するにはどうすればよいですか?
使ってます
[@"mytext" drawInrect : CGRrectIntegral (rect) withFont:font];
写真にテキストを書くには、毎回異なる角度でテキストを書くにはどうすればよいですか?(テキストと一緒に回転するはずのローリング画像)。
重複の可能性:
NSStringを斜めに描画するにはどうすればよいですか?
使ってます
[@"mytext" drawInrect : CGRrectIntegral (rect) withFont:font];
写真にテキストを書くには、毎回異なる角度でテキストを書くにはどうすればよいですか?(テキストと一緒に回転するはずのローリング画像)。
以下のコードは回転しますlabel
- (IBAction)rotate:(id)sender {
CGContextRef context = UIGraphicsGetCurrentContext();
[UIView beginAnimations:nil context:context];
[UIView setAnimationDuration:0.5];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(endAnimation)];
CGAffineTransform rotate = CGAffineTransformMakeRotation(90.0f * (M_PI / 180.0f));
self.label.transform = rotate;
[UIView commitAnimations];
}