iOS 5 - Issue with deleting UITableViewCell with NSFetchedResultsControlller and Cust


i've got uibutton on tableviewcell of app, i'm trying use delete cell. (i know should use standard swipe-to-delete, doesn't fit ux , better). i've used following code try delete cell. no warnings of in xcode, when run app , try delete cell, sigtrap crash , cell not deleted, log says "deleting (null)" opposed deleting (itemname). have suggestions on how fix issue? huge can out. i've been struggling same issue more week, , cannot figure out @ all.

code:
- (ibaction)deletebuttontapped:(id)sender {      uibutton *button = (uibutton *)sender;  uiview *backview = (uiview *)button.superview;  uitableviewcell *cell = (uitableviewcell *)backview.superview;  nsindexpath *indexpath = [self.tableview indexpathforcell:cell];    item *itemtodelete = [self.fetchedresultscontroller objectatindexpath:indexpath];  nslog(@"deleting (%@)", itemtodelete);  [self.managedobjectcontext deleteobject:itemtodelete];  [self.managedobjectcontext save:nil];    [self.tableview deleterowsatindexpaths:[nsarray arraywithobject:indexpath] withrowanimation:uitableviewrowanimationfade];  [self performfetch];
 

do correct index path?
 


Forums iPhone, iPad, and iPod Touch iOS Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

Comments

Popular posts from this blog

Rogue - the old text based game. I can't find it!

RAID in Early 2009 Mac Pro

NBC Releases Summer Olympics iOS Apps, Offering Livestreaming of All 302 Events