[英]App stuck on splash screen - ending with an NSException on Xcode
Everytime I launch the app in the simulator it runs but doesn't go past the launch/splash screen and I've created 1 slide for the onboarding screen but can't see the update on my simulator and this error keeps coming up...每次我在模拟器中启动应用程序时,它都会运行,但 go 没有超过启动/启动屏幕,我为入职屏幕创建了 1 张幻灯片,但在我的模拟器上看不到更新,并且此错误不断出现。 .
Not sure what I'm doing wrong...不知道我做错了什么......
Exception NSException * "[<UIViewController 0x7f9673d08e90> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key NextBtn." 0x0000600003a61020
name __NSCFConstantString * "NSUnknownKeyException" 0x00007fff801e80a0
__NSCFString __NSCFString
reason __NSCFString * "[<UIViewController 0x7f9673d08e90> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key NextBtn." 0x00006000005086e0
userInfo __NSDictionaryI * 2 key/value pairs 0x0000600002146e40
[0] (null) "NSTargetObjectUserInfoKey" : (no summary)
[1] (null) "NSUnknownUserInfoKey" : "NextBtn"
reserved __NSDictionaryM * 2 key/value pairs 0x000060000342dce0
[0] (null) "callStackReturnAddresses" : 42 elements
[1] (null) "callStackSymbols" : 42 elements
Open your Storyboard and search for "NextBtn" outlet on the right pane in the last section (Connections Inspector).打开 Storyboard 并在最后一部分(连接检查器)的右侧窗格中搜索“NextBtn”插座。
You will see there a little exclamation mark.你会看到那里有一个小感叹号。
Fix it either by removing or reconnecting outlet to the code.通过删除或重新将插座连接到代码来修复它。
Everytime when you see每次看到
this class is not key value coding-compliant for the key
it means that there is a broken outlet connection in Storyboard/XIB.这意味着 Storyboard/XIB 中的插座连接断开。 Just look for exclamation marks icons and remove them.只需查找感叹号图标并将其删除。
It can easily happen when you copy-paste views, change/delete classes in code or rename properties names in code (but you forget to recreate outlets in interface builder) manually and not by refactor option.当您手动复制粘贴视图、更改/删除代码中的类或重命名代码中的属性名称(但您忘记在界面构建器中重新创建出口)而不是通过重构选项时,很容易发生这种情况。 Storyboards/XIBs are not that intelligent and you need to maintain synchronization with code by yourself basically. Storyboards/XIBs 没有那么智能,基本上你需要自己保持与代码的同步。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.