解除导航视图控制器

解除导航视图控制器

本文介绍了解除导航视图控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在为iOS平台开发游戏.游戏的初始视图控制器是一个登录屏幕,玩家登录后,便会进入加载屏幕,然后是导航视图控制器,其中包含带有当前游戏列表的表格视图.故事板的相关视图关系如下所示:

I am currently working on a game for the iOS platform. The game's initial view controller is a login screen, and once the player logs in, he gets to a loading screen, and then a navigation view controller containing a table view with a list of current games. The storyboard's relevant view relations look like this:

[登录屏幕] --modalsegue-> [正在加载屏幕] --modalsegue-> [导航控制器] --relationship-> [表视图(带注销按钮)]

[login screen] --modalsegue-> [loading screen] --modalsegue-> [navigation controller] --relationship-> [tableview (with logout button)]

我想在导航视图的[表格视图]底部的底部创建一个注销按钮,该按钮将播放器带回到[登录屏幕].我该怎么办?

I want to make a logout button at the bottom bar of the navigation view's [table view], which takes the player back to the [login screen]. How can I do this?

提前谢谢!

推荐答案

您可以关闭self.presentingViewController.presentingViewController或使用dismissToRootViewController.

这篇关于解除导航视图控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-31 10:49