我有一个带有两个动态原型单元格的表格视图。表格视图使用performSegue
它来显示新导航控制器的模式显示。它在 IOS 6.0 模拟器上运行良好,但在 IOS 5.1 设备上运行良好(我使用的是 6.0 SDK,但针对的是 5.1 平台)。
我无法让附件视图正常工作 - 两个问题
- 如果我将公开附件视图添加到动态表格单元格原型并使用
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
tableview 委托方法,它永远不会被调用。这已在其他地方被问过,但还没有答案。 或者,如果我使用情节提要编辑器从 disclsoure 附件视图触发 segue,它在模拟器上工作正常,但当我尝试使可重用单元出队时在设备上崩溃。下面的崩溃堆栈转储
2012-10-15 21:09:07.744 mainapp[338:707] CRASH: [<DateCell 0x1e5b30> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key accessoryActionSegueTemplate. 2012-10-15 21:09:07.771 mainapp[338:707] Stack Trace: ( 0 CoreFoundation 0x373cd8a7 __exceptionPreprocess + 186 1 libobjc.A.dylib 0x350d2259 objc_exception_throw + 32 2 CoreFoundation 0x373cd5c5 -[NSException init] + 0 3 Foundation 0x37bcc323 _NSSetUsingKeyValueSetter + 130 4 Foundation 0x37bcbe23 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 23 5 UIKit 0x31263965 -[UIView(CALayerDelegate) setValue:forKey:] + 156 6 Foundation 0x37ba5f09 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 132 7 CoreFoundation 0x3732c7d3 -[NSObject performSelector:] + 38 8 CoreFoundation 0x3732d461 -[NSArray makeObjectsPerformSelector:] + 152 9 UIKit 0x313190c3 -[UINib instantiateWithOwner:options:] + 918 10 UIKit 0x311027bd -[UITableView dequeueReusableCellWithIdentifier:] + 304 11 mainapp 0x0005b769 -[SetupViewController tableView:cellForRowAtIndexPath:] + 80 12 UIKit 0x31101efb -[UITableView(UITableViewInternal) _createPreparedCellForGlobalRow:withIndexPath:] + 546 13 UIKit 0x31100fd9 -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1076 14 UIKit 0x31100763 -[UITableView layoutSubviews] + 206 15 UIKit 0x310a4f15 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 148 16 CoreFoundation 0x3732c1fb -[NSObject performSelector:withObject:] + 42 17 QuartzCore 0x374f1aa5 -[CALayer layoutSublayers] + 216 18 QuartzCore 0x374f16bd _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 216 19 QuartzCore 0x374f5843 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 226 20 QuartzCore 0x374f557f _ZN2CA11Transaction6commitEv + 314 21 QuartzCore 0x374ed4b9 _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 56 22 CoreFoundation 0x373a1b1b __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 18 23 CoreFoundation 0x3739fd57 __CFRunLoopDoObservers + 258 24 CoreFoundation 0x373a00b1 __CFRunLoopRun + 760 25 CoreFoundation 0x373234a5 CFRunLoopRunSpecific + 300 26 CoreFoundation 0x3732336d CFRunLoopRunInMode + 104 27 GraphicsServices 0x33ae2439 GSEventRunModal + 136 28 UIKit 0x310cfcd5 UIApplicationMain + 1080 29 mainapp 0x000566ad main + 96 30 mainapp 0x00056648 start + 4 )
我曾尝试删除和重新创建情节提要中的场景,认为它们可能已损坏,但没有乐趣。任何建议将不胜感激。
谢谢
安德鲁