斯威夫特(Swift):放宽搜寻功能无效 [英] Swift: unwind segue doesn't work

查看:100
本文介绍了斯威夫特(Swift):放宽搜寻功能无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我因某种原因无法正常运行,所以我按照教程中的说明进行了所有操作:cntrl拖动以退出并从另一个控制器中选择放松动作(请参阅随附的gif).当我在iPhone上运行它并点击取消"时,什么也没有发生.

I'm stuck with unwind segue that doesn't work for some reason, I do everything as described in tutorial: cntrl drag to exit and select unwind action from another controller (please see gif attached). When I run it on my iphone and tap Cancel, nothing happens.

推荐答案

您似乎想从中放松的视图控制器已经在UINavigationController堆栈的底部,因此它不会做任何事情当调用展开时.

It looks like the view controller you're trying to unwind from is already the bottom of the UINavigationController's stack, so it's not going to do anything when the unwind is called.

如果正在以模态方式调用UINavigationController,请致电

If that UINavigationController is being called modally, call

self.navigationController?.dismiss(animated: true, completion: nil)

在按下按钮的视图控制器中.

within the view controller where the button is being pressed.

这篇关于斯威夫特(Swift):放宽搜寻功能无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆