UINavigationController 横向模式下的后退按钮问题?

发布于 2024-09-05 22:11:36 字数 222 浏览 0 评论 0原文

我的iPhone应用程序之前支持纵向模式,现在我想也支持横向模式。

除了导航控制器后退按钮之外,我的应用程序中的一切都工作正常。 我在导航控制器中使用了表格视图,当我在横向模式下单击后退按钮时,视图会弹出并加载以前的视图,但动画很奇怪。

我已经给出了默认动画,但是,在横向模式下,当我单击后退按钮时,视图是上下颠倒的动画,而不是默认的左键。

有人遇到过这样的问题吗??? 提前致谢。

my iphone application supports portrait mode earlier, now i want to support land scape mode also.

everything is working fine in my application except the navigation controller back button.
i have used tableviews in navigaton conroller, when i click back button in landscape mode view is getting poped and its loading its previous view but animation is strange.

i have given default animation but, in landscape mode view is is animating upside down instead of default left to rite when i click back button.

does anyone faced this kind of problem???
thanks in advance.

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

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

发布评论

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

评论(1

一曲琵琶半遮面シ 2024-09-12 22:11:36

我理解了这个问题,下面是解决方案......
我推入导航控制器的每个视图控制器都应该具有以下委托方法。

每个视图控制器应确认它支持方向更改

  • (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    self.orientation = 接口方向;
    返回是;
    }

i understood the problem and below is the solution...
each viewcontroller which i am pushing into navigation controllers should have the following delegate method.

each view controller should confirm that it is supporting the orientation change

  • (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    self.orientation = interfaceOrientation;
    return YES;
    }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文