gpt4 book ai didi

objective-c - 在分割 View 中调用关闭模态视图 Controller 会导致旋转到纵向模式

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

我在 UISplitViewApplication 中呈现一个 UIModalView。我已经连接了一个“完成”操作,它是:

- (IBAction) donePressed:(id) sender
{
[self dismissModalViewControllerAnimated:YES];
}

当我按下按钮时,设备的方向会更改为肖像模式。这是为什么?

最佳答案

我认为您没有提供足够的代码让任何人都能够给您准确的答案,但一种可能是您没有在所有 Controller 中实现以下方法:

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

关于objective-c - 在分割 View 中调用关闭模态视图 Controller 会导致旋转到纵向模式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6049852/

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