gpt4 book ai didi

iphone - 方向纵向和横向模式

转载 作者:行者123 更新时间:2023-11-29 05:05:28 26 4
gpt4 key购买 nike

我有 2 个大 Logo 图像。横向模式下一切正常。当我切换到纵向模式时,图像一张一张地叠在一起。它们对于 IB 对齐来说太大了我可以为每个方向设置不同的 View 吗?或者我该如何解决这个问题。

最佳答案

更新 saadnib 的答案。不要使用shouldAutorotateToInterfaceOrientation。这个方法是有其他用途的。

你的方法是:

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation

前者在旋转发生之前调用,第二个在界面方向之后调用。

您应该在此处替换 UIViewController 的 View ,或者也可以在此处替换不同方向的图像。

关于iphone - 方向纵向和横向模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5451137/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com