如何将UIImageView更改为landscapemode? [英] How to change a UIImageView into landscapemode?

查看:97
本文介绍了如何将UIImageView更改为landscapemode?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将UIImageView更改为landscapemode?
我有一个UIImageview.whe它在potrait模式下旋转它。
代码:

How to change a UIImageView into landscapemode? I have a UIImageview.whe it rotated its still in potrait mode. code:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}


推荐答案

如果你只想要你的应用程序要在横向中运行并且不允许纵向,请更新应用的info.plist中的支持的界面方向列表,以仅包含横向方向。

If you only want your app to run in landscape and NOT allow portrait, update the 'Supported interface orientations' list in your app's info.plist to only include the landscape orientations.

这篇关于如何将UIImageView更改为landscapemode?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆