- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在学习 Swift,我在 DesignCode 上开设类(class),现在我正在尝试创建一个应用程序来改进我所学的知识。
这就是我所做的:
我创建了 UIViewController 并执行到 UITableViewController 的 segue;
在 UITableViewController 中,我嵌入了导航栏,在其中创建了“后退”栏按钮项;
我将此“返回”链接到退出,通过“Spring”执行转场以放松。
当我单击此按钮时,我收到以下错误:
2015-06-04 15:32:08.662 Vitrine[2883:67901] *** Assertion failure in -[UIStoryboardUnwindSegueTemplate _perform:], /SourceCache/UIKit_Sim/UIKit-3347.44/UIStoryboardUnwindSegueTemplate.m:78
2015-06-04 15:32:08.676 Vitrine[2883:67901] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not find a view controller to execute unwinding for <UINavigationController: 0x7ae41540>'
*** First throw call stack:
(
0 CoreFoundation 0x0154d746 __exceptionPreprocess + 182
1 libobjc.A.dylib 0x02f4ea97 objc_exception_throw + 44
2 CoreFoundation 0x0154d5da +[NSException raise:format:arguments:] + 138
3 Foundation 0x019c3720 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 118
4 UIKit 0x0253d3b4 -[UIStoryboardUnwindSegueTemplate _perform:] + 387
5 UIKit 0x0237c313 -[UIStoryboardSegueTemplate perform:] + 116
6 libobjc.A.dylib 0x02f647cd -[NSObject performSelector:withObject:withObject:] + 84
7 UIKit 0x01d72a90 -[UIApplication sendAction:to:from:forEvent:] + 99
8 UIKit 0x020f8bba -[UIBarButtonItem(UIInternal) _sendAction:withEvent:] + 139
9 libobjc.A.dylib 0x02f647cd -[NSObject performSelector:withObject:withObject:] + 84
10 UIKit 0x01d72a90 -[UIApplication sendAction:to:from:forEvent:] + 99
11 UIKit 0x01d72a22 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64
12 UIKit 0x01eb318a -[UIControl sendAction:to:forEvent:] + 69
13 UIKit 0x01eb35a7 -[UIControl _sendActionsForEvents:withEvent:] + 598
14 UIKit 0x01eb2811 -[UIControl touchesEnded:withEvent:] + 660
15 UIKit 0x01dcacfa -[UIWindow _sendTouchesForEvent:] + 874
16 UIKit 0x01dcb7d6 -[UIWindow sendEvent:] + 792
17 UIKit 0x01d896d1 -[UIApplication sendEvent:] + 242
18 UIKit 0x01d99b08 _UIApplicationHandleEventFromQueueEvent + 21484
19 UIKit 0x01d6d337 _UIApplicationHandleEventQueue + 2300
20 CoreFoundation 0x0146f06f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
21 CoreFoundation 0x01464b7d __CFRunLoopDoSources0 + 253
22 CoreFoundation 0x014640d8 __CFRunLoopRun + 952
23 CoreFoundation 0x01463a5b CFRunLoopRunSpecific + 443
24 CoreFoundation 0x0146388b CFRunLoopRunInMode + 123
25 GraphicsServices 0x050c62c9 GSEventRunModal + 192
26 GraphicsServices 0x050c6106 GSEventRun + 104
27 UIKit 0x01d71106 UIApplicationMain + 1526
28 Vitrine 0x00076cd4 main + 180
29 libdyld.dylib 0x0366bac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
问候,迪奥戈·阿马拉尔
最佳答案
您必须在想要返回的 View 中创建一个如下所示的 IBAction:
@IBAction func back(segue:UIStoryboardSegue) {
//no code here, unless you want to do something when exiting
}
然后,在您想要退出的 View 中,将您的 barButtonItem
链接到退出(IBAction 应该出现在那里)。
关于ios - 放松不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30651602/
今天有小伙伴给我留言问到,try{...}catch(){...}是什么意思?它用来干什么? 简单的说 他们是用来捕获异常的 下面我们通过一个例子来详细讲解下
我正在努力提高网站的可访问性,但我不知道如何在页脚中标记社交媒体链接列表。这些链接指向我在 facecook、twitter 等上的帐户。我不想用 role="navigation" 标记这些链接,因
说现在是 6 点,我有一个 Timer 并在 10 点安排了一个 TimerTask。之后,System DateTime 被其他服务(例如 ntp)调整为 9 点钟。我仍然希望我的 TimerTas
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我就废话不多说了,大家还是直接看代码吧~ ? 1
Maven系列1 1.什么是Maven? Maven是一个项目管理工具,它包含了一个对象模型。一组标准集合,一个依赖管理系统。和用来运行定义在生命周期阶段中插件目标和逻辑。 核心功能 Mav
我是一名优秀的程序员,十分优秀!