Sunday 15 August 2010

ios - How to disable a UITableViewCell but still have interactions with accessory views (i.e UISwitch) -


Is there any way that I can disable a UITableViewCell by triggering didSelectCellAtIndexPath: rep , While still maintaining the ability to use UISwitch in the secondary scene of that room.

I know that you can set the cell. User.Enabled = NO, this will disable the cell but it also prevents me from switching secondary scene I know that I could also find out how the cell was in the didSelectCellAtIndexPath: method Was taped from, but since my table view is dynamic and changes based on what can be dirty by the user.

I am looking for a simple and elegant solution that I could use. Any ideas?

If you do not want to use the cell. User.EnergyEnabled = NO So you set up the cell. SelectionStyle = UITableViewCellSelectionStyleNone

and its cell was triggered SelectionRowAtIndexPath

Now in this method, in "didSelectRowAtIndexPath" you want to compare / select an object index by comparing the object type with your data source array.

No comments:

Post a Comment