Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

midntdj

macrumors newbie
Original poster
Sep 23, 2009
9
0
I have a TableView with a custom cell format. The cells have multiple text data on the right & left hand side of the cell.

example:

PHP:
First Name                Last Name
Address                    State
Phone


What I would like to do, is when the user swipes the cell to delete that row and the "Delete" button appears, I would like to hide the Last Name & State text that is being displayed. Currently, the "Delete" button displays on top of the text in the cell.

I should be able to put the code in the "canEditRowAtIndexPath" unless there is a more appropriate place for it:

Code:
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
	
	NSUInteger row = [indexPath row];
	return YES;
}

Is this something that can be done? If so, could someone point me in the right direction? Should I redraw the entire cell without the two fields I want to hide?

Thanks in advance.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.