- mongodb - 在 MongoDB mapreduce 中,如何展平值对象?
- javascript - 对象传播与 Object.assign
- html - 输入类型 ="submit"Vs 按钮标签它们可以互换吗?
- sql - 使用 MongoDB 而不是 MS SQL Server 的优缺点
我对此很陌生。我按照 Apple 的 iPhone 项目“HelloWorld”教程一步一步来。我在 iPhone 5.0 模拟器中运行它,它崩溃了:
2012-11-02 14:46:06.782 HelloWorld[9880:c07] * Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint' * First throw call stack: (0x14a2052 0xea2d0a 0x144aa78 0x144a9e9 0x32f7d7 0x32f9af 0x32f6b7 0x23036d 0xd7e2c 0xd83a9 0xd85cb 0x38a73 0x38ce2 0x38ea8 0x3fd9a 0x10be6 0x118a6 0x20743 0x211f8 0x14aa9 0x138cfa9 0x14761c5 0x13db022 0x13d990a 0x13d8db4 0x13d8ccb 0x112a7 0x12a9b 0x1fed 0x1f15 0x1) terminate called throwing an exception(lldb)
谁能告诉我出了什么问题?我正在使用 Xcode 4.5。
最佳答案
默认情况下,当您在 Xcode 4.5 中创建新的 iOS 项目时,您的 Storyboard或 XIB 设置为使用 Autolayout,这是 iOS 6.0 中的新功能。 NSLayoutConstraint
类是 Autolayout 系统的一部分,在旧版本的 iOS 中不存在。
如果您想将您的应用部署到旧版本的 iOS,您需要将您的 Storyboard或 XIB 更改为不使用自动布局。这是文件检查器中的一个复选框:
关于objective-c - NSInvalidUnarchiveOperationException : Could not instantiate class named NSLayoutConstraint,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13201586/
我正在使用其中有 UINavigationController 的 Storyboard。 View Controller 被弹出和推送。 问题是,当我推送一个 UIViewController 时,
* 由于未捕获的异常“NSInvalidUnarchiveOperationException”而终止应用程序,原因:“* -[NSKeyedUnarchiver decodeObjectForKey
使用带有嵌入序列的 ContainerView 我得到这个: * 由于未捕获的异常“NSInvalidUnarchiveOperationException”而终止应用程序,原因:“无法实例化名为 U
更新到 xCode 5 后,在 iOS 5 和 iOS 6 模拟器上运行我的应用程序时出现以下错误。它在 iOS 7 上运行良好。此代码未修改 xCode 升级之前的代码。 * Terminating
如果我在 ipad 3 ios 6.1 上运行我的应用程序,应用程序工作正常,但如果我在 ipad 1 ios 5.1 上运行它,我会收到此错误并且应用程序崩溃: 2013-02-09 12:20:5
这是 xcode 抛出的错误: Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', re
我的应用程序启动失败,我将问题定位到以下代码: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPat
请注意,我是 Swift 和 iOS 编程的新手,所以你们中的一些人可能会觉得这有点傻。 无论如何,我正在编码一个 Int 对象并将它与一个 String 键相关联,如下所示: func encode
我已将符合 NSCoding 的类“分配”的数组存档到共享(应用程序组)容器中的文件: class private func updateSharedFiles() { let path =
我在 Swift 中使用 Codable 和 NSKeyedArchiver 和 NSKeyedUnarchiver 来编码/解码对象。 当编码对象与预期格式匹配时,一切都会很好。但是,如果数据无效或
使用 ObjectiveC,我正在开发一个针对 iOS 11 的 SingleView 应用程序,该应用程序具有一个 View Controller / View 。在 View 顶部的 Main.s
用这个复制UIView UIView copyOfView = [NSKeyedUnarchiver unarchiveObjectWithData:[NSKeyedArchiver archived
在 Xcode 更新 (5.1) 之后,当我尝试在 iOS 6.x 中运行时,我的应用程序崩溃了。 我有一个应用程序,其中有一个自定义单元格和约束。 未选中 xib 文件的自动布局。我得到的错误是:
我有一个用户对象,我需要将其存储在 NSUserDefaults 中并与 iOS 8 扩展应用程序 (Watchkit) 共享。在主容器应用程序中,我可以毫无问题地对对象进行编码和解码。但是,当我尝试
我对此很陌生。我按照 Apple 的 iPhone 项目“HelloWorld”教程一步一步来。我在 iPhone 5.0 模拟器中运行它,它崩溃了: 2012-11-02 14:46:06.782
这个问题在这里已经有了答案: "Could not instantiate class named UIStoryboardShowSegueTemplate" - how can I make a
我正在做一个使用 Storyboard的项目(第一次使用 Storyboard)。在其中一个 View Controller 中,有一个带有 map View 的 View 和一个包含原型(proto
我没有在我的 iOS 应用程序中使用 MapKit;我通过 pod 使用 GoogleMaps v2.7.0。它在我的 iPhone5s iOS v10.3.3 上崩溃。 我没有任何线索。有人经历过吗
当然,我用谷歌搜索并使用了 stackoverflow 中的搜索。我发现了一些类似的讨论: Could not instantiate class named MKMapView http://for
我是一名优秀的程序员,十分优秀!