从导航视图和模态视图返回主视图

发布于 2024-11-04 16:42:54 字数 359 浏览 4 评论 0原文

方式创建了视图

我以主视图 -> 的 模态视图(导航控制器)->导航视图根->导航视图 A

模态视图呈现样式是默认的(从底部向上),当模态视图被关闭(取消操作)时,它会返回到底部。

当导航视图 A 被按下时,它会像往常一样从右侧滑动。当我从导航视图 A 中关闭模态视图时,它也会返回到底部。

我的问题是,如何通过滑回右侧来从导航视图 A 中关闭模态视图?

我想要实现的行为可以在 Microsoft bing 应用程序上找到。进入设置页面时,呈现为模态视图。但对于下一个级别的详细信息(书签、历史记录......),它们通过导航显示。每当按下详细的“完成”按钮时,视图就会滑动(而不是转到底部)并返回主页。

I have views created in the way

main view -> modal view (navigation controller) -> navigation view root -> navigation view A

The modal view presentation style is default (coming up from the bottom), when modal view is dismissed (cancel action), it goes back to the bottom.

When navigation view A is pushed, it slides from right hand side as usual. When I dismiss the modal view from navigation view A, it also goes back to the bottom.

My question is, how can I dismiss modal view from navigation view A by sliding back to right?

The behave I am trying to achieve can be found on Microsoft bing app. When entering the setting page, it's presented as modal view. But for next levels in details (bookmarks, history ..), they are shown by navigation. Whenever done button in detail is pressed, the view slides (instead of going to bottom) and return to the home page.

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

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

发布评论

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

评论(2

你对谁都笑 2024-11-11 16:42:54

在文档中,有这些可能的样式:

typedef enum {
   UIModalTransitionStyleCoverVertical = 0,
   UIModalTransitionStyleFlipHorizontal,
   UIModalTransitionStyleCrossDissolve,
   UIModalTransitionStylePartialCurl,
} UIModalTransitionStyle;

我认为如果这些样式不符合您的需求,您必须自己创建动画。也许这个正确的链接可以帮助。

In the docs there are these possible styles available:

typedef enum {
   UIModalTransitionStyleCoverVertical = 0,
   UIModalTransitionStyleFlipHorizontal,
   UIModalTransitionStyleCrossDissolve,
   UIModalTransitionStylePartialCurl,
} UIModalTransitionStyle;

I think if these styles doesn't match your needs you have to create your animation yourself. Maybe this correct link can help.

惯饮孤独 2024-11-11 16:42:54

我发现我想要的效果可以通过使用CATransition来实现。该链接有更多详细信息, http://www .iphonedevsdk.com/forum/iphone-sdk-development/13427-uiview-slide-transition.html

I found the effect I am looking for can be achieved by using CATransition. The link has more details, http://www.iphonedevsdk.com/forum/iphone-sdk-development/13427-uiview-slide-transition.html

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