我目前正在使用左侧滑动菜单开发iOS app
。我使用了这个link的模板:(顺便说一句,这是一个极其编码的左侧滑动菜单演示),我更喜欢使用storyboard来设计UI。
因此,我从这个Github
链接移植了api。我遵循指示但仍然有一些致命的错误。这是我的项目副本的link。任何人都可以帮我解决问题。
以下是控制台中显示的异常输出:
2014-12-01 16:08:21.654 Fitness Main Framework[10757:504122] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 0 beyond bounds for empty array'
*** First throw call stack:
(
0 CoreFoundation 0x0000000104e8fb75 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010477fbb7 objc_exception_throw + 45
2 CoreFoundation 0x0000000104d8772e -[__NSArrayI objectAtIndex:] + 190
3 Fitness Main Framework 0x0000000103fd196f -[PHAirViewController saveThumbnailImage:atIndexPath:] + 159
4 Fitness Main Framework 0x0000000103fce560 -[PHAirViewController showAirViewFromViewController:complete:] + 752
5 Fitness Main Framework 0x0000000103fd3841 -[ZZPersonalProfileTabVC leftButtonTouch] + 145
6 UIKit 0x000000010528063e -[UIApplication sendAction:to:from:forEvent:] + 75
7 UIKit 0x00000001053872c0 -[UIControl _sendActionsForEvents:withEvent:] + 467
8 UIKit 0x000000010538668f -[UIControl touchesEnded:withEvent:] + 522
9 UIKit 0x00000001052c60e8 -[UIWindow _sendTouchesForEvent:] + 735
10 UIKit 0x00000001052c6a13 -[UIWindow sendEvent:] + 683
11 UIKit 0x0000000105293791 -[UIApplication sendEvent:] + 246
12 UIKit 0x00000001052a085d _UIApplicationHandleEventFromQueueEvent + 17370
13 UIKit 0x000000010527be9c _UIApplicationHandleEventQueue + 2066
14 CoreFoundation 0x0000000104dc49d1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
15 CoreFoundation 0x0000000104dba89d __CFRunLoopDoSources0 + 269
16 CoreFoundation 0x0000000104db9ed4 __CFRunLoopRun + 868
17 CoreFoundation 0x0000000104db9906 CFRunLoopRunSpecific + 470
18 GraphicsServices 0x00000001081009f0 GSEventRunModal + 161
19 UIKit 0x000000010527f1a0 UIApplicationMain + 1282
20 Fitness Main Framework 0x0000000103fd38d3 main + 115
21 libdyld.dylib 0x0000000107c55145 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
答案 0 :(得分:0)
我终于找到了我的问题的解决方案。这是一个愚蠢的错误,我错误地将viewdidload代码复制到memeorylow函数... api很棒