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 protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to