ユーザーがiPhoneを回転させた時に、UIImageViewに貼り付けた画像も同じように回転させる方法を以下に記載する。 1. シンプルなView-based Applicationの場合。 この場合は非常に簡単で、UIImageViewを管理するUIViewControllerのサブクラスでshouldAutorotateToInterfaceOrientationメソッドをオーバーライドし、YESを返すようにするだけである。これだけでUIImageViewに貼り付けた画像は自動的に回転してくれる。 また、UIImageViewのcontentModeをUIViewContentModeScaleAspectFitに指定しておく事で、画像サイズも適度に調節してくれる。 @interface ImageViewRotateTestViewController : UIViewContro
