0
A
回答
1
這個想法是在設備旋轉時應用圖形「變換」來修改圖像。看到這個答案here ...在你的圖像控制器,添加以下代碼(其中將backgroundImage是包含圖像的屬性。
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
duration:(NSTimeInterval)duration {
if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft) {
backgroundImage.transform = CGAffineTransformMakeRotation(M_PI/2);
}
else if (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight){
backgroundImage.transform = CGAffineTransformMakeRotation(-M_PI/2);
}
else {
backgroundImage.transform = CGAffineTransformMakeRotation(0.0);
}
}
相關問題
- 1. CSS - 旋轉背景圖片
- 2. MonoTouch。旋轉背景圖片
- 3. 用jQuery變換(旋轉)背景圖片?
- 4. 點擊旋轉背景圖片
- 5. 如何合併旋轉圖像和背景圖片?
- 6. 如何在WPF中旋轉Grid背景圖片?
- 7. 如何每5秒鐘旋轉背景圖片? JavaScript的?
- 8. 背景圖像旋轉
- 9. 背景圖像旋轉器
- 10. 旋轉背景圖像
- 11. CSS背景圖像旋轉
- 12. android:如何在不旋轉背景的情況下旋轉位圖前景
- 13. CSS3背景圖片轉換
- 14. 在背景圖像上旋轉圖像
- 15. 如何讓背景變大然後旋轉屏幕?
- 16. 如何在背景圖片上放置背景圖片?
- 17. 如何讓圖標旋轉
- 18. 如何在CSS中旋轉背景?
- 19. 如何旋轉(移動)背景cocos2d-android?
- 20. 如何防止UIView背景旋轉?
- 21. 如何旋轉畫布背景
- 22. iOS - 使用自動佈局更改背景圖片的旋轉
- 23. Twitter的引導旋轉木馬沒有拉伸背景圖片
- 24. 使用jQuery旋轉背景圖片效果
- 25. 旋轉(改變),居中,拉伸背景圖片腳本
- 26. 旋轉時不伸展的背景圖片
- 27. Kivy如何旋轉圖片
- 28. 如何旋轉圖片框
- 29. PHP圖片不能讓背景透明
- 30. 旋轉對背景圖像的影響
雖然這是停止了轉動,我會做出改變,使其旋轉的方式 –