照片选择器应用程序也有同样的问题!

发布于 2024-09-30 22:42:59 字数 353 浏览 1 评论 0原文

这和我之前的帖子有关,但这里开了一个新帖子,因为它涉及苹果自己的示例代码。

打开示例代码并修改应用程序,使其以横向显示并向视图添加文本字段。

运行应用程序并打开图像选择器,选择一个图像,您将按照预期返回到上一个横向屏幕。

现在点击文本字段并看到键盘滚动到视图中......在纵向模式下?

这种情况发生在 iPad 上而不是 iPhone 上,这是怎么回事???

链接文本

This is related to my previous thread, but opened a new one here as it involves Apple's own sample code.

Open the sample code and modify the app so it will display in landscape and add a textfield to the view.

Run the app and open the image picker, select an image and you will be returned to the previous screen in landscape as you would expect.

Now tap the text field and see the keyboard scroll into view....in portrait mode?

This happens on the iPad not the iPhone, what gives????

link text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

风月客 2024-10-07 22:42:59

我在这个论坛上找到了答案:-)

“键盘将显示在状态栏的方向上,由于某种原因,状态栏并不总是随着旋转而改变。因此,如果您只想在横向设置中显示该视图[UIApplication SharedApplication].statusBarOrientation = UIInterfaceOrientationLandscapeLeft; 或您希望在 viewWillAppear 方法中选择的方向。”

但为什么它在 iPhone 上不这样做???

I have found the answer on this forum :-)

"The keyboard will show up in the orientation of the statusbar, which doesn't always change with rotations for some reason. So if you want to display that view only in landscape set [UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationLandscapeLeft; or whichever orientation you want to prefer in your viewWillAppear method."

Although why it does not do this on the iPhone ????

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文