Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/106.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如果更改设备类型,Xcode 8模拟器将崩溃_Ios_Objective C_Arrays_Swift_Ios Simulator - Fatal编程技术网

Ios 如果更改设备类型,Xcode 8模拟器将崩溃

Ios 如果更改设备类型,Xcode 8模拟器将崩溃,ios,objective-c,arrays,swift,ios-simulator,Ios,Objective C,Arrays,Swift,Ios Simulator,我正在使用Xcode 8。但我有一个问题,特别是当我试图在模拟器中更改设备类型时,它崩溃了,我收到一条崩溃消息 *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array' *** First throw call stack: ( 0 CoreFoun

我正在使用Xcode 8。但我有一个问题,特别是当我试图在模拟器中更改设备类型时,它崩溃了,我收到一条崩溃消息

*** Terminating app due to uncaught exception 'NSRangeException', reason:
'*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(
    0   CoreFoundation                      0x0000000103b5934b __exceptionPreprocess + 171
    1   libobjc.A.dylib                     0x00000001035ba21e objc_exception_throw + 48
    2   CoreFoundation                      0x0000000103a8af1b -[__NSArrayM objectAtIndex:] + 203
    3   Mahroosa                            0x0000000102e207c7 -[MainViewController viewSliderControllerAtIndex:] + 151
    4   Mahroosa                            0x0000000102e21117 -[MainViewController LoadSlides] + 1495
    5   Mahroosa                            0x0000000102e25b32 -[MainViewController TimerTick:] + 98
    6   Foundation                          0x0000000103115144 __NSFireTimer + 83
    7   CoreFoundation                      0x0000000103aeb964 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
    8   CoreFoundation                      0x0000000103aeb5f3 __CFRunLoopDoTimer + 1075
    9   CoreFoundation                      0x0000000103aeb17a __CFRunLoopDoTimers + 250
    10  CoreFoundation                      0x0000000103ae2f01 __CFRunLoopRun + 2065
    11  CoreFoundation                      0x0000000103ae2494 CFRunLoopRunSpecific + 420
    12  GraphicsServices                    0x0000000108f2ca6f GSEventRunModal + 161
    13  UIKit                               0x00000001048ebf34 UIApplicationMain + 159
    14  Mahroosa                            0x0000000102e34a2f main + 111
    15  libdyld.dylib                       0x000000010628868d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 
有什么想法吗


提前谢谢

通过删除旧的libc++abi.tbd,尝试将其添加为libc++abi.tbd。你能看到堆栈跟踪显示代码中发生这种情况的位置吗?@jtbandes谢谢你的回复。我如何解决这个问题。?在
LoadSlides
中,你调用的
viewSliderControllerAtIndex
索引不正确。数组为空。