3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

UIView.transformを使って回転させるときには、対象Viewのautolayoutを無効にする必要がある

Last updated at Posted at 2014-06-25

回転させ続ける場合、UIViewの再配置がtransformの度に行われてしまい、へんてこな回転をしてしまう。

// UIViewの回転の処理の例
-(void)rotate {
  // _myviewの中心を基準に100度回転させる
  CGFloat angle = 100 * M_PI / 180;
  _myview.transform = CGAffineTrasnformMakeRotation(angle);
}

autolayoutを有効にしたままの回転方法をご存知の方は、教えて頂ければ幸いです。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?