• 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
UITableViewDelegate and selection under editing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UITableViewDelegate and selection under editing


  • Subject: UITableViewDelegate and selection under editing
  • From: Roland King <email@hidden>
  • Date: Thu, 18 Feb 2010 00:13:18 +0800

I have a UITableView with a delegate which tracks didSelectRow: and didDeselectRow: however when the tableview goes into edit mode the selection highlight disappears but there are no callbacks to didDeselectRow. It seems that when you come out of editing mode again there is no selection (no highlight) and the selected row is nil. There's no delegate method which tells me I'm entering edit mode and I should cache the selection and attempt to restore it when editing is done if it's not been deleted (and move it if it's been moved).

Have I missed something here? Is there a way to persist the selection through editing or at least get a callback when editing causes the selection to invalidate? I feel like I have to subclass the TableView itself, remember any selection when editing begins (the only place you can capture editing events) and check to see if whatever thing I started with is still there after editing and re-select it then call the delegate methods myself.

Have I missed something? I'd expect didDeselectRow: calls whatever caused the row to deselect, even if that's just going into edit mode, even if it's a bit hopeful to expect the table in edit mode to track the originally selected item and call the delegate to tell it as it moves or is deleted.  _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: UITableViewDelegate and selection under editing
      • From: Luke the Hiesterman <email@hidden>
  • Prev by Date: Re: Xcode performance issues over time
  • Next by Date: Re: Code Signing for Mac application
  • Previous by thread: Re: [Xcode] Advanced EXC_BAD_ACCESS hunting
  • Next by thread: Re: UITableViewDelegate and selection under editing
  • Index(es):
    • Date
    • Thread