Custom UITableViewCell parent is NIL
Custom UITableViewCell parent is NIL
- Subject: Custom UITableViewCell parent is NIL
- From: Michael de Haan <email@hidden>
- Date: Mon, 07 Apr 2014 20:43:15 -0700
I wonder if I might get some insight into this issue.
I have implemented a custom UITableViewCell in a (test) project with batch deletions, following the guidelines of the sample code "MultiSelectTableView". This works as expected. However, "swipe to Delete" does not work.
To debug this, I created a close replica using the standard UITableViewCell, and implemented this code, triggered by the dataSourceMethod, "cellForRowAtIndexPath".
In the case of the latter, this code....
-(void)analyzeCellForGestures:(UITableViewCell*)cell{
UIView *view = (CustomUITableViewCell*)cell;
NSArray * gestures;
while (view && ![view isKindOfClass:[UITableView class]]) {
gestures = view.gestureRecognizers;
[gestures enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
NSLog(@"Gesture for: %@: %@", [view class], obj);
}];
UIView * parentView = view.superview;
view = parentView;
}
}
....shows gesture recognizers associated with the tableView.
In the case of the Custom UITableViewCell, the first iteration of "parentView = view.superview" produces "nil".
I am curious if this has anything to do with the problem, and if so, is this expected?
Thanks in advance.
_______________________________________________
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