2016-06-21 3 views
0

タブベースのアプリケーションでタブ間を移動するときにアプリで通常のクラッシュが発生し始めました。私のプロジェクトをきれいにすれば、問題は解決されません。この問題は、いくつかの項目を持つUIStackViewを持つ特定のViewControllerでのみ発生しています(下の図を参照)。何か案は?ここにクラッシュの詳細があります。問題は、私はこのVCではないから来ているビューです可能ですか?TabBarベースのアプリケーションで特定のコントローラに切り替えるときにクラッシュする

enter image description here

enter image description here

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </Users/JS/Library/Developer/CoreSimulator/Devices/0EB640A8-A38D-451B-81DF-124F43ED521D/data/Containers/Bundle/Application/69891CB7-3978-41AA-8770-DD34202BBED6/Entelechy.app> (loaded)' with name 'D7U-k5-h22-view-pa4-wP-GXp' and directory 'Main.storyboardc'' 
*** First throw call stack: 
(
    0 CoreFoundation      0x01a8d494 __exceptionPreprocess + 180 
    1 libobjc.A.dylib      0x01547e02 objc_exception_throw + 50 
    2 CoreFoundation      0x01a8d3bd +[NSException raise:format:] + 141 
    3 UIKit        0x0292caf0 -[UINib instantiateWithOwner:options:] + 554 
    4 UIKit        0x026b9380 -[UIViewController _loadViewFromNibNamed:bundle:] + 429 
    5 UIKit        0x026b9db8 -[UIViewController loadView] + 189 
    6 UIKit        0x026ba1c4 -[UIViewController loadViewIfRequired] + 154 
    7 UIKit        0x026baab1 -[UIViewController view] + 35 
    8 UIKit        0x0271bd33 -[UITabBarController _viewForViewController:] + 33 
    9 UIKit        0x02728491 -[UITabBarController transitionFromViewController:toViewController:transition:shouldSetSelected:] + 606 
    10 UIKit        0x027273ae -[UITabBarController transitionFromViewController:toViewController:] + 76 
    11 UIKit        0x02722a7e -[UITabBarController _setSelectedViewController:] + 453 
    12 UIKit        0x02722885 -[UITabBarController setSelectedViewController:] + 252 
    13 UIKit        0x027271d9 -[UITabBarController _tabBarItemClicked:] + 587 
    14 libobjc.A.dylib      0x0155c0b5 -[NSObject performSelector:withObject:withObject:] + 84 
    15 UIKit        0x024ebe38 -[UIApplication sendAction:to:from:forEvent:] + 118 
    16 UIKit        0x024ebdb7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64 
    17 UIKit        0x02946fd3 -[UITabBar _sendAction:withEvent:] + 525 
    18 libobjc.A.dylib      0x0155c0b5 -[NSObject performSelector:withObject:withObject:] + 84 
    19 UIKit        0x024ebe38 -[UIApplication sendAction:to:from:forEvent:] + 118 
    20 UIKit        0x024ebdb7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64 
    21 UIKit        0x0268ff3b -[UIControl sendAction:to:forEvent:] + 79 
    22 UIKit        0x026902d4 -[UIControl _sendActionsForEvents:withEvent:] + 433 
    23 UIKit        0x0268ff7b -[UIControl sendActionsForControlEvents:] + 48 
    24 UIKit        0x0294cdc3 -[UITabBar(Static) _buttonUp:] + 123 
    25 libobjc.A.dylib      0x0155c0b5 -[NSObject performSelector:withObject:withObject:] + 84 
    26 UIKit        0x024ebe38 -[UIApplication sendAction:to:from:forEvent:] + 118 
    27 UIKit        0x024ebdb7 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64 
    28 UIKit        0x0268ff3b -[UIControl sendAction:to:forEvent:] + 79 
    29 UIKit        0x026902d4 -[UIControl _sendActionsForEvents:withEvent:] + 433 
    30 UIKit        0x0268f2c1 -[UIControl touchesEnded:withEvent:] + 714 
    31 UIKit        0x0256c52e -[UIWindow _sendTouchesForEvent:] + 1095 
    32 UIKit        0x0256d5cc -[UIWindow sendEvent:] + 1159 
    33 UIKit        0x0250ebe8 -[UIApplication sendEvent:] + 266 
    34 UIKit        0x024e3769 _UIApplicationHandleEventQueue + 7795 
    35 CoreFoundation      0x0199fe5f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15 
    36 CoreFoundation      0x01995aeb __CFRunLoopDoSources0 + 523 
    37 CoreFoundation      0x01994f08 __CFRunLoopRun + 1032 
    38 CoreFoundation      0x01994846 CFRunLoopRunSpecific + 470 
    39 CoreFoundation      0x0199465b CFRunLoopRunInMode + 123 
    40 GraphicsServices     0x05759664 GSEventRunModal + 192 
    41 GraphicsServices     0x057594a1 GSEventRun + 104 
    42 UIKit        0x024e9eb9 UIApplicationMain + 160 
    43 Entelechy       0x000b36da main + 138 
    44 libdyld.dylib      0x053b7a25 start + 1 
    45 ???         0x00000001 0x0 + 1 
) 
libc++abi.dylib: terminating with uncaught exception of type NSException 
(lldb) 

答えて

1

nibの読み込みに失敗したとき、この種の問題が発生します。 最初に試してくださいProduct--> Cleanまたは ファイルが正しく参照されていないか、名前を変更した可能性があります。 このようなファイルの参照を削除し、プロジェクトをクリーンアップし、正しい参照を付けて再実行します。

+0

私が述べたように、製品はそれを修正します。しかし、簡単にしか。ストーリーボード内の参照ファイルを意味しますか? – user1542125

+0

ViewControllerのリファレンス。私は言うことを意味する –

+0

どのようにそのビューコントローラをロードしていますか?それはクラッシュしています。 –

関連する問題