• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Custom UITableViewCell parent is NIL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Custom UITableViewCell parent is NIL
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Retain count in non ARC
  • Next by Date: Re: Custom UITableViewCell parent is NIL
  • Previous by thread: NSOperation subclass with abstract class?
  • Next by thread: Re: Custom UITableViewCell parent is NIL
  • Index(es):
    • Date
    • Thread