Re: Custom UITableViewCell parent is NIL
Re: Custom UITableViewCell parent is NIL
- Subject: Re: Custom UITableViewCell parent is NIL
- From: Michael de Haan <email@hidden>
- Date: Tue, 08 Apr 2014 13:50:50 -0700
On Apr 8, 2014, at 6:16 AM, Steve Christensen <email@hidden> wrote:
> On Apr 7, 2014, at 9:32 PM, Michael de Haan <email@hidden> wrote:
>
>> It still however leaves me puzzled as to why I cannot implement Swipe to delete. (the 2 usual suspects), ie
>>
>> -(BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath;
>> -(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
>>
>> are implemented.
>
> I realize that this will come across as a “is it plugged in?” sort of question, but have you put a breakpoint, or added a NSLog(), to each of those methods to see if they’re actually being called? And if -tableView:canEditRowAtIndexPath: is being called, are there any cases where you return NO?
Turns out that the issue seems to revolve around the property of the UITableView "allowsMultipleSelectionDuringEditing", which has to be "NO" for swipe-to-Delete and "YES" for batch deletions, each being exclusive of the other.
So, in the end, I set the appropriate value (YES) in the edit mode for batch deletions, then back to the baseline value ("NO") for swipe-to-delete.
Thank you all again.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden