gpt4 book ai didi

ios - 展开两个 segue

转载 作者:搜寻专家 更新时间:2023-10-31 19:34:28 27 4
gpt4 key购买 nike

我的应用程序(相关部分)的定义:

我的 View 中有 map (MAP)。用户单击一个 View ,应用程序反向地理编码以获取地址并转到另一个 View (PICKER),它允许用户从选择器中选择她想要的地点名称或转到另一个 View 并提供自定义名称 (CUSTOM)。

Storyboard of the app

问题是,当我尝试从 CUSTOM 中解脱时,它失败了。

在自定义中,我使用与 MAP Controller 中的 PICKER 相同的方法,即

@IBAction func unwindCancel(segue:UIStoryboardSegue) {
// do nothing as saving was cancelled
return
}

@IBAction func unwindSave(segue:UIStoryboardSegue) {
self.reloadGeodesics()
}

下面我展示了我是如何在 Storyboard中展开的,即按住 ctrl 键拖动取消(并保存)退出并选择相应的 Action 继续。

This is my action segue

这些是我的错误信息

2015-11-02 14:58:59.753 via[19620:2883125] -[via.LocationNamePickerViewController unwindSave:]: unrecognized selector sent to instance 0x7bb35770

2015-11-02 14:58:59.789 via[19620:2883125] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[via.LocationNamePickerViewController unwindSave:]: unrecognized selector sent to instance 0x7bb35770'

当我点击保存时。 via 是我的应用名称,LocationNamePickerViewController 是 PICKER 的 Controller 。我看了很多教程,对我来说,我似乎做的一切都是对的。

这是错误的从PICKER中的Other到CUSTOM进行segue的问题吗? MAP 和 PICKER 之间的导航 Controller 是否会使编译器崩溃?从错误看来,PICKER 的 Controller 无法将操作 segue 调用委托(delegate)给 MAP 的 Controller 。这会发生吗?如果发生,如何解决?在 PICKER 中一切正常,问题在于展开 CUSTOM。

最佳答案

你创建unwind segue的方式不对,你应该这样创建segue

Control + 从 Location Enter VC 拖动到 Map Exit

动图

关于ios - 展开两个 segue,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33478484/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com