强制更改选项卡栏控制器的方向

发布于 2024-08-27 04:31:26 字数 117 浏览 2 评论 0原文

哈。

在我的 iPhone 应用程序中,我不会在不旋转设备的情况下将标签栏方向更改为横向或纵向,这样当我按下旋转按钮时,整个标签栏控制器需要旋转为横向或纵向模式。

有人可以给我一个建议吗?

Hai.

In my iphone app i won't to change my tabbar orientation to landscape or portrait with out rotating the device, such that when i am pressing rotate button whole tabbar controller need to rotate for either landscape or portrait mode.

can any one please give me a suggestion.

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

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

发布评论

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

评论(1

玩物 2024-09-03 04:31:26

如果您不想改变方向,请尝试更改框架。

void convertPortraitToLandscap()
{
  CGPoint temp;
  temp = [touch locationInView:self];
  touchPoint.x = temp.y;
  touchPoint.y = 320 - temp.x;
}

上面的代码将点从纵向转换为横向...类似地尝试更改视图的框架。

If you don't want to change orientation, try changing the frame.

void convertPortraitToLandscap()
{
  CGPoint temp;
  temp = [touch locationInView:self];
  touchPoint.x = temp.y;
  touchPoint.y = 320 - temp.x;
}

The above code convert points from portrait to landscape... similarly try changing the frame of the view.

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