简体   繁体   中英

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...

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).

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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM