iGotchya

Just need a place to file mistakes and avoid repeating them

  • Home
    • Edit
    • Delete
    • Tags
    • Autopost

    setEditing for a UITableView belonging to a UIViewController

    When using a UITableViewController, it seems that if you set the controller's editing property, then it the super call takes care of setting the tableView property's edit property as well. This fires off calls to delegate methods responding to edit mode for the UITableView and the UITableViewCell's.

    However, if you are using a UIViewController with a custom UITableView property as the table view's delegate, then the setEditing super call does not pass on the editing property to the UITableView. Be sure to call it from the setEditing method yourself on the table view:

    - (void)setEditing:(BOOL)editing animated:(BOOL)animated {              [super setEditing:editing animated:animated];              [self.myTableView setEditing:editing animated:animated] 
    • 29 September 2009
    • Views
    • 1 Comment
    • Permalink
    • Tweet
    • 1 response
    • Like
    • Comment
    almost 2 years ago encodeco (Twitter) responded:
    Mypic2_normal
    Thanks a lot. It's helped me.
  • Doug Petkanics's Space

    Co-Founder of Hyperpublic. Fighting the good fight.

    Archive

    2009 (3)
    September (3)
  • About Doug Petkanics

    Co-Founder of Hyperpublic. Fighting the good fight.

  • Subscribe via RSS
  • Follow Me

      TwitterFacebookLinkedIn

Theme created for Posterous by Obox