I have a table view with two dynamic prototype cells. The tableview is shown using performSegue
which does a modal display of a new Navigation controller. It works fine on the IOS 6.0 simulator, but not on an IOS 5.1 device (I'm using the 6.0 SDK but targeting a 5.1 platform).
I can't get the accessory view to work correctly - two problems
- If I add the disclosure accessory view to the dynamic table cell prototype and use the
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
tableview delegate method, it never gets called. This has been asked elsewhere but no answers yet. Alternatively, if I use the storyboard editor to trigger a segue from the disclsoure accessory view, it works fine on the simulator, but crashes on the device when I attempt to dequeue the reusable cell. Crash stackdump below
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 )
I have tried deleting and recreating the scenes in storyboard thinking that they may have become corrupted, but no joy. Any suggestions would be gratefully received.
Thanks
Andrew