• 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
Table cell: how show blue when tapped only while editing is true?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Table cell: how show blue when tapped only while editing is true?


  • Subject: Table cell: how show blue when tapped only while editing is true?
  • From: Steve Fogel <email@hidden>
  • Date: Wed, 9 Sep 2009 23:42:46 -0700

Hi, all...

I've got a table view for which users must tap an Edit button before they can make changes. This button puts the table view in editing mode.

How can I make the cell show blue (it's selected) only while editing is true?

The scenario I want:

When editing = NO

1. User taps a cell (with default white background) and holds down finger. No reaction, no blue
2. User lifts finger, nothing happens.


When editing = YES

1. User taps cell and holds down finger. Cell turns blue.
2. User lifts finger. Cell goes white again and is processed by didSelectRowAtIndexPath. (didSelectRowAtIndexPath deselects cell, then processes.)


I have #2 under control in each case, but can't figure out how to do #1. In cellForRowAtIndexPath, I tried setting selectionStyle to UITableViewCellSelectionStyleBlue if editing is true and to UITableViewCellSelectionStyleNone if editing is false, but, during the transition from not-editing to editing, unless I run reloadData, or slide the cell out of view and then back in again, the selection style change doesn't occur. I don't want to reload data when the user clicks Edit, because I have some animations going (I remove a section while editing), and reloadData fouls up the animation.

Any ideas?

Thx

Steve
_______________________________________________

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: Table cell: how show blue when tapped only while editing is true?
      • From: Luke the Hiesterman <email@hidden>
  • Prev by Date: Re: NSArray EXEC_BAD_ACCESS when initalized with strings
  • Next by Date: Re: Passing variables between .m files
  • Previous by thread: Re: Show/Hide file extension issue in savePanel
  • Next by thread: Re: Table cell: how show blue when tapped only while editing is true?
  • Index(es):
    • Date
    • Thread