0
A
回答
0
我通过旋转屏幕解决我的问题
if (toorientation == UIInterfaceOrientationPortrait) {
sub_view.transform = CGAffineTransformMakeRotation(degreesToRadin(0));
}
else if (toorientation == UIInterfaceOrientationPortraitUpsideDown){
sub_view.transform = CGAffineTransformMakeRotation(degreesToRadin(180));
}
else if (toorientation == UIInterfaceOrientationLandscapeLeft){
sub_view.transform = CGAffineTransformMakeRotation(degreesToRadin(-90));
}
else if (toorientation == UIInterfaceOrientationLandscapeRight){
sub_view.transform = CGAffineTransformMakeRotation(degreesToRadin(90));
}
1
把它放在违规视图的UIViewController中。它应该解决你的问题。
- (BOOL)shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation
{
switch(interfaceOrientation){
case UIInterfaceOrientationPortrait: return YES;
break;
case UIInterfaceOrientationLandscapeLeft: return YES;
break;
case UIInterfaceOrientationLandscapeRight: return YES;
break;
default: return NO;
break;
}
}
相关问题
- 1. UIBarButtonItem支持自定义视图的纵向和横向尺寸?
- 2. 如何在uiwebview视频标签中支持横向模式?
- 3. 自定义视图在横向模式下替换TableView
- 4. 强制视图仅支持横向模式
- 5. UIPagviewController子视图横向模式
- 6. 加入了横向视图不支持
- 7. 如何在横向模式下播放视频,但应用只支持纵向模式?
- 8. 如何在iOS中支持横向和纵向视图?
- 9. 如何拥有一个视图支持纵向和横向
- 10. 支持在UINavigationController中只有一个视图的横向
- 11. UIImagePickerController仅支持肖像模式。任何支持横向模式的替代品?
- 12. 在UITabBarController的UIWebView中支持HTML5视频的横向模式
- 13. 如何在iOS上支持横向模式? shouldAutorotateToInterfaceOrientation只被调用一次
- 14. 如何在横向模式下自定义日期选择器
- 15. UIPageViewController - 如何在横向模式下自定义左右页面?
- 16. 只在横向模式
- 17. 如何在横向模式下将子视图与主视图一起转换
- 18. ActionBarSherlock:选项卡在横向模式下丢失自定义视图
- 19. 在横向模式下向UIScrollView添加子视图
- 20. 纵向应用 - 横向模式视图 - 无自转
- 21. 如何将视图从纵向旋转到横向模式
- 22. 如何将纵向视图更改为横向模式?
- 23. 在WPF中同时支持横向和纵向视图
- 24. 在横向模式下打开视图
- 25. 旋转视图以横向模式
- 26. 自动布局问题在横向视图自定义键盘
- 27. 如何更改横向模式下图像视图的位置
- 28. 如何在一个UIView中支持横向/纵向定位
- 29. 当支持横向模式时强制iPad应用以纵向模式启动
- 30. 支持横向的UIVIEWS:
感谢üAurun拉奎拉,我想你没有得到我的问题,你可以请看到我的编辑问题 – MaheshBabu 2011-02-03 06:08:41