具体崩溃如下:
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<SPSpO2ViewController 0x7f8b0f631c40> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key resultLabel.'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23e3de6e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff512539b2 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23e3da39 -[NSException raise] + 9
3 Foundation 0x00007fff258ffbd6 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 325
4 UIKitCore 0x00007fff48c722de -[UIViewController setValue:forKey:] + 87
5 UIKitCore 0x00007fff48f7f60f -[UIRuntimeOutletConnection connect] + 109
6 CoreFoundation 0x00007fff23e2a182 -[NSArray makeObjectsPerformSelector:] + 242
7 UIKitCore 0x00007fff48f7c7f8 -[UINib instantiateWithOwner:options:] + 2192
8 UIKitCore 0x00007fff48f7d117 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 147
9 PC100 0x000000010f905b72 -[SPSpO2ViewController viewDidLayoutSubviews] + 1650
10 UIKitCore 0x00007fff4982d80b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 3013
很莫名其妙的,只要有控件在view上,就会提示找不到
看提示发现,说的是VC上没有这个key.........
什么鬼
解决办法
我的代码我的坑,上图祭天:

image.png
应该是设置View的Custom Class的,给误操作搞成了 Files owner,具体他们的区别,前面文章有提到.