Hello everyone!
I Want to change my custom cell when the user tab on a cell in my table view.
I think i have to use the event didSelectRowAtIndexPath and change here, but i donīt know.. please help me!
Well, basically you will need to delete the current row, and insert a new row in the same place. You can trigger that from didSelectRow.
But, what's going to happen is the cellForRow will be called again, so that method will need to know to give you a different cell. So you are going to have to set a flag somewhere that defines which cell should be returned in that case.
Well, basically you will need to delete the current row, and insert a new row in the same place. You can trigger that from didSelectRow.
But, what's going to happen is the cellForRow will be called again, so that method will need to know to give you a different cell. So you are going to have to set a flag somewhere that defines which cell should be returned in that case.
Thanks for the answer Brian...
But I'm a begginer.. did you see the new twitter app? they have a customcell, when you slide the finger on a cell, another cell appear and you have some options. When you slide your finger on another cell, that fisrt cell changed returns and the options appear on the current cell.
You're doing 2 actions here. The cell that is sliding out is being deleted. The cell that is sliding in is being inserted. So you need to do both actions at the same time inside that update block.
And that's why the number of items in the array doesn't need to change.
You're doing 2 actions here. The cell that is sliding out is being deleted. The cell that is sliding in is being inserted. So you need to do both actions at the same time inside that update block.
And that's why the number of items in the array doesn't need to change.
Ok Brian... thanks a lot!
I don't know how insert a new CustomCell, you can post a code example for me? please.
I have a CustomCell that is my customcells on the tableView, and I have a CustomDetailCell that will have to appear after a tap or slide on the cell.