ios - 'NSInternalInconsistencyException',原因 : 'cannot decode special type ' 14' on pre iOS 11 Devices

标签 ios swift uikit

我的其中一个屏幕出现崩溃,这是使用 xib 文件启动的。崩溃日志很忙,实际上并没有指出什么可能是罪魁祸首。在 iOS 11 和 12 上一切正常。我在网上搜索,因为 NSInternalInconsistencyException 很常见,但没有找到与我相同的原因。

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'cannot decode special type '14''
*** First throw call stack:
(
0   CoreFoundation                      0x04faa494 __exceptionPreprocess + 180
1   libobjc.A.dylib                     0x04772e02 objc_exception_throw + 50
2   CoreFoundation                      0x04faa3bd +[NSException raise:format:] + 141
3   Foundation                          0x01f62945 newDecodedValue + 497
4   Foundation                          0x01f65ce4 -[NSPlaceholderValue initWithCoder:] + 32
5   UIKit                               0x0379949d UINibDecoderDecodeObjectForValue + 739
6   UIKit                               0x037991b2 -[UINibDecoder decodeObjectForKey:] + 320
7   UIKit                               0x034bb719 -[_UIAttributeTraitStorageRecord initWithCoder:] + 157
8   UIKit                               0x0379949d UINibDecoderDecodeObjectForValue + 739
9   UIKit                               0x037996ae UINibDecoderDecodeObjectForValue + 1268
10  UIKit                               0x037991b2 -[UINibDecoder decodeObjectForKey:] + 320
11  UIKit                               0x034ba383 -[_UITraitStorage initWithCoder:] + 227
12  UIKit                               0x0379949d UINibDecoderDecodeObjectForValue + 739
13  UIKit                               0x037996ae UINibDecoderDecodeObjectForValue + 1268
14  UIKit                               0x037991b2 -[UINibDecoder decodeObjectForKey:] + 320
15  UIKit                               0x034b9fdd -[_UITraitStorageList initWithCoder:] + 174
16  UIKit                               0x0379949d UINibDecoderDecodeObjectForValue + 739
17  UIKit                               0x037996ae UINibDecoderDecodeObjectForValue + 1268
18  UIKit                               0x037991b2 -[UINibDecoder decodeObjectForKey:] + 320
19  UIKit                               0x03585f21 -[UINib instantiateWithOwner:options:] + 1627
20  UIKit                               0x03312380 -[UIViewController _loadViewFromNibNamed:bundle:] + 429

最佳答案

事实证明,在 iOS 11 之前的设备上不支持使用语言方向边距。将其替换为 Xib 中的标准边距,并解决错误原因:“无法解码特殊类型‘14’”。

关于ios - 'NSInternalInconsistencyException',原因 : 'cannot decode special type ' 14' on pre iOS 11 Devices,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53815543/

相关文章:

iphone - Xcode iOS : Streaming of video file while recording

iphone - 获取GKLocalPlayer上面两个好友的分数

swift - 当我删除 UIPanguesture 时,为什么我的 UIScrollView 不滚动?

iphone - iOS 按住手势 + 点击

iphone - 更快的 iPhone 图形

ios - viewWillTransitionToSize :withTransitionCoordinator: called when app goes into the background or inactive

ios - 从数据/模糊使用中获取值(value)

objective-c - 为什么在我的代码之后没有将注释添加到 map 上?

swift - 如何根据 swift 3 中动态创建的按钮的文本设置按钮宽度?

swift - 转到特定的 UIViewController