- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
Application Specific Information:
*** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -'[__NSArrayM objectAtIndex:]: index 5 beyond bounds [0 .. 3]'
0 CoreFoundation __exceptionPreprocess + 124
1 libobjc.A.dylib objc_exception_throw + 56
2 CoreFoundation -[__NSArrayM removeObjectAtIndex:] + 0
3 UIKit -[UITableView cellForRowAtIndexPath:] + 252
4 someApp -[businessViewClass methodA:] (businessViewClass.m:298)
5 someApp -[businessViewClass scrollViewDidScroll:] (businessViewClass.m:292)
6 UIKit -[UIScrollView(UIScrollViewInternal) _notifyDidScroll] + 76
7 UIKit -[UIScrollView setContentOffset:] + 460
8 UIKit -[UITableView setContentOffset:] + 300
9 UIKit -[UIScrollView(UIScrollViewInternal) _adjustContentOffsetIfNecessary] + 60
10 UIKit -[UIScrollView setContentSize:] + 128
11 UIKit -[UITableView _applyContentSizeDeltaForEstimatedHeightAdjustments:] + 56
12 UIKit -[UITableViewRowData setHeight:forRowAtIndexPath:] + 572
13 UIKit __53-[UITableView _configureCellForDisplay:forIndexPath:]_block_invoke + 3016
14 UIKit +[UIView(Animation) performWithoutAnimation:] + 80
15 UIKit -[UITableView _configureCellForDisplay:forIndexPath:] + 460
16 UIKit -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 788
17 UIKit -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 80
18 UIKit -[UITableView _updateVisibleCellsNow:isRecursive:] + 2360
19 UIKit -[UITableView cellForRowAtIndexPath:] + 136
20 someApp -[businessViewClass methodA:] (businessViewClass.m:298)
21 UIKit -[UIScrollView(UIScrollViewInternal) _notifyDidScroll] + 76
22 UIKit -[UIScrollView setContentOffset:] + 460
23 UIKit -[UITableView setContentOffset:] + 300
24 UIKit -[UIScrollView _smoothScrollWithUpdateTime:] + 2400
25 QuartzCore CA::Display::DisplayLinkItem::dispatch() + 40
26 QuartzCore CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 424
27 IOKit 0x000000018334de54 0x183348000 + 24148
28 CoreFoundation __CFMachPortPerform + 180
29 CoreFoundation __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
30 CoreFoundation __CFRunLoopDoSource1 + 436
31 CoreFoundation __CFRunLoopRun + 1800
32 CoreFoundation CFRunLoopRunSpecific + 384
33 GraphicsServices GSEventRunModal + 180
34 UIKit UIApplicationMain + 204
35 someApp main (main.m:15)
36 libdyld.dylib 0x0000000182b528b8 0x182b50000 + 10424
UIScrollview
时似乎调用了一个业务方法,然后此业务方法调用了
cellForRowAtIndexPath
的
UITableView
方法,然后
cellForRowAtIndexPath
触发了
scrollViewDidScroll
的
UIScrollView
方法。我用
cellForRowAtIndexPath
方法调用
scrollViewDiddScroll
。它回来了。但是它不会重复出现,因为调用的下一个方法是
NSArrayM removeObjectAtIndex
而不是触发
ScrollViewDidScroll
的
UIScrollView
方法。然后出现
NSRangeException
。
最佳答案
您的tableview的numberOfRowsInSection方法返回的值大于您的count数组。
数组的计数为3,您正在访问数组的第5个对象。
关于ios - cellForRowAtIndexPath NSRangeException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44015296/
我正在编写一个基于核心数据的 iPhone 应用程序,而且我是 Objective-C 的新手。 我有一个正在努力解决的错误。 iPhone 模拟器不断崩溃并显示以下错误消息: 2010-03-21
当我尝试将属性应用于子字符串时,有时在以下代码中崩溃: // Dummy strings let originalString = "Some example string" let searchSu
我试图在按下主页按钮时保存数据。这是我的相关代码。 - (NSString *) saveFilePath { NSArray *path = NSSearchPathForDi
我有一个应用程序,用户报告该应用程序随机崩溃。所有崩溃都有相同的堆栈 0 CoreFoundation TAGPBIvarClearUInt32 (in SPONTAN) + 11 1 l
我在下面的方法中得到 substringWithRange:range 的异常。 我有禁用编辑的 TextView 。 我仅将文本字段用于文本选择。当我第一次选择文本时没有异常(exception),
Application Specific Information: *** Terminating app due to uncaught exception 'NSRangeException',
大家好,我是 swift 的新手,我的程序面临一个问题。我已在“let defaultStudentId = NSUserDefaults.standardUserDefaults()”中保存一些数据
我试图在从 JSON 解析对象后填充 TableView 。我想将行数设置为已解析对象的计数。 这是我的 viewDidLoad 代码: - (void)viewDidLoad { [supe
我的应用在 _storeArray 中随机崩溃。 在 viewDidLoad 中,有一个方法 [self loadUrl] 解析 xml 文件,然后添加字典 [_storeArray addObjec
我仍在边做边学,所以如果这听起来像是一个菜鸟问题,那可能就是这样。 我正在尝试遍历 NSDictionary(消息)并获取某个键的值。 当我运行这段代码时,出现以下错误“* 由于未捕获的异常‘NSRa
我有一个我无法解决的问题。我正在使用 Core Data 框架创建一个 iOS 应用程序。在我得到 NSRangeException 之前,一切都很顺利。这个异常是我在检查应用程序数据是否需要更新的函
你好我是 iPhone 编程的新手,我正在使用 EGOPhotViewer 并想通过使用此代码显示图像, for ( recipeImages in recipeImages.imgArray) {
我无法 repo 这个问题。我明白 NSRangeException 代表什么,但我不明白为什么它会在创建 nib 文件时出现。这是我从 Crashlytics 收到的崩溃报告: Fatal Exce
我尝试将 360 全景图加载到 UIViewController 的 UIWebView 中,该全景图采用 html 格式并内置于 krpano 中。当全景图打开时,一切正常。虽然过了一段时间后,我得
我正在尝试从相机捕捉图像和录制视频,但每当我用相机关闭 View 时,我都会收到此错误: Terminating app due to uncaught exception 'NSRangeExcep
应用程序在 iOS 11 更新之前运行良好。在 iOS 11 推出后,一些用户遇到了以下崩溃,但我无法在模拟器 iOS 11 中重现此问题。基于 fabric.io,并非所有 iOS 11 都经历过此
在向我的应用程序添加新的 Core Data 模型版本后,我执行了轻量级迁移,显然是成功的。迁移的文件加载正常,但在第一次尝试通过特定关系访问属性时,应用程序崩溃并显示 NSRangeExceptio
在我的应用程序中,更新表格内容后,我尝试将 UITableView 滚动到顶部一次。然而,在某些情况下,我的 table 是空的。所以我得到了以下异常: Terminating app due to
我有一个 NSRangeException 错误,该错误并不总是发生(尤其是在调试时)。它是随机出现的,我无法弄清楚它来自哪里。我有很多数组操作,因此很难以这种方式消除它。 我的问题是我是否可以从调试
我正在做教程并收到以下错误。 我的代码: #import int main (int argc, const char * argv[]) { //NSAutoreleasePool *p
我是一名优秀的程序员,十分优秀!