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

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


  • Subject: Re: Table cell: how show blue when tapped only while editing is true?
  • From: Luke the Hiesterman <email@hidden>
  • Date: Thu, 10 Sep 2009 08:28:45 -0700

When you want nothing to happen, cell.selectionStyle = UITableViewCellSelectionStyleNone;

When you want blue, cell.selectionStyle = UITableViewCellSelectionStyleBlue;

Luke


On Sep 9, 2009, at 11:42 PM, Steve Fogel wrote:

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

_______________________________________________

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


References: 
 >Table cell: how show blue when tapped only while editing is true? (From: Steve Fogel <email@hidden>)

  • Prev by Date: Re: XC & IB 3.2 overlapping siblings
  • Next by Date: Adding an observer is memory expensive
  • Previous by thread: Table cell: how show blue when tapped only while editing is true?
  • Next by thread: XC & IB 3.2 overlapping siblings
  • Index(es):
    • Date
    • Thread