12207480 / DOPDropDownMenu-Enhanced

DOPDropDownMenu 添加双列表 优化版 新增图片支持(double tableView, The optimization version ,new add image,detailText)
MIT License
1.74k stars 362 forks source link

当有两列数据是双列表,并且其数据数量不同时,在切换列时出现崩溃 #7

Closed czzhengkw closed 9 years ago

czzhengkw commented 9 years ago

如题

12207480 commented 9 years ago

我在项目中没有这个问题 是不是你数目row item 判断问题 ,还有请给出奔溃信息

czzhengkw commented 9 years ago

我测试的数据是 // 数据 self.classifys = @[@"美食",@"今日新单",@"电影",@"酒店"]; self.cates = @[@"自助餐",@"快餐",@"火锅",@"日韩料理",@"西餐",@"烧烤小吃"]; self.movices = @[@"内地剧",@"港台剧",@"英美剧"]; self.hostels = @[@"经济酒店",@"商务酒店",@"连锁酒店",@"度假酒店",@"公寓酒店"]; self.areas = @[@"全城",@"芙蓉区",@"雨花区"]; self.areas1 = @[@"全城",@"芙蓉区",@"雨花区"]; self.sorts = @[@"默认排序",@"离我最近",@"好评优先",@"人气优先",@"最新发布"];

下面是修改测试的两个方法

下面是错误信息 2015-05-29 12:30:47.085 DOPdemo[17322:8397163] * Terminating app due to uncaught exception 'NSRangeException', reason: '-[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:]: row (3) beyond bounds (3) for section (0).' * First throw call stack: ( 0 CoreFoundation 0x0000000109296c65 __exceptionPreprocess + 165 1 libobjc.A.dylib 0x0000000108f2fbb7 objc_exception_throw + 45 2 CoreFoundation 0x0000000109296b9d +[NSException raise:format:] + 205 3 UIKit 0x0000000109c337aa -[UITableView _contentOffsetForScrollingToRowAtIndexPath:atScrollPosition:] + 1178 4 UIKit 0x0000000109c34378 -[UITableView scrollToRowAtIndexPath:atScrollPosition:animated:] + 33 5 UIKit 0x0000000109c35d6a -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] + 1198 6 DOPdemo 0x00000001089ed514 -[DOPDropDownMenu tableView:cellForRowAtIndexPath:] + 3508 7 UIKit 0x0000000109c45a28 -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 508 8 UIKit 0x0000000109c24248 -[UITableView _updateVisibleCellsNow:isRecursive:] + 2853 9 UIKit 0x0000000109c3a8a9 -[UITableView layoutSubviews] + 210 10 UIKit 0x0000000109bc4a2b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 536 11 QuartzCore 0x00000001099c7ec2 -[CALayer layoutSublayers] + 146 12 QuartzCore 0x00000001099bc6d6 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380 13 QuartzCore 0x00000001099bc546 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24 14 QuartzCore 0x0000000109928886 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242 15 QuartzCore 0x0000000109929a3a _ZN2CA11Transaction6commitEv + 462 16 UIKit 0x0000000109b41626 _UIApplicationHandleEventQueue + 2140 17 CoreFoundation 0x00000001091ca431 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 18 CoreFoundation 0x00000001091c02fd CFRunLoopDoSources0 + 269 19 CoreFoundation 0x00000001091bf934 CFRunLoopRun + 868 20 CoreFoundation 0x00000001091bf366 CFRunLoopRunSpecific + 470 21 GraphicsServices 0x000000010d483a3e GSEventRunModal + 161 22 UIKit 0x0000000109b44900 UIApplicationMain + 1282 23 DOPdemo 0x00000001089ef33f main + 111 24 libdyld.dylib 0x000000010bd03145 start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException

12207480 commented 9 years ago

谢谢 我已找到问题 晚上fix

czzhengkw commented 9 years ago

非常感谢,期待 fix

12207480 commented 9 years ago

fixed