iPhone 中的方向?

发布于 2024-10-06 17:37:45 字数 89 浏览 0 评论 0原文

在我的应用程序中,我使用方向,我必须根据方向更改控件的大小。我使用了一个标志,并根据该标志更改了控件的大小。但我的疑问是,当用户每次旋转手机时,这个方向都会影响吗?

In my application, I use Orientation, I have to change the size of the controls according to the orientation. I have used a flag and according to that flag I change the size of the controls. But my doubt is, will this orientation affect every time, when user rotates the phone?

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

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

发布评论

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

评论(1

飞烟轻若梦 2024-10-13 17:37:45

我认为,你最好使用
view.autoresizingMask 而不是更改视图大小和方向。否则,它将改变尺寸,但仍然会再次调用方向尺寸代码。

I think, better you use
view.autoresizingMask instead of changing the view sizes wrt orientation. Otherwise, it will change the size, but still, the orientation-size code will be called again n again.

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