I have a tableView. Everything it set up and working. I had cell.accessoryType working fine, but not once have I gotten cell.editingAccessoryType to work. It worked with that deprecated method, but with the new one...no luck. Here's my code, at least for the first section:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = nil;
switch (indexPath.section)
{
case RFE_SECTION:
switch (indexPath.row)
{
case 0:
{
static NSString *RFECellIdentifier = @"RFECellIdentifier";
cell = [tableView dequeueReusableCellWithIdentifier:RFECellIdentifier];
if (cell == nil)
{
// Create a cell to display "Add Visit".
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:RFECellIdentifier] autorelease];
cell.textLabel.lineBreakMode = UILineBreakModeWordWrap;
cell.textLabel.numberOfLines = 0;
cell.textLabel.font = [UIFont fontWithName:@"American Typewriter" size:16.0f];
}
if (visit.rfe.length == 0)
{
cell.textLabel.text = @"Add Reason for Encounter";
}
if (visit.rfe.length != 0)
{
cell.textLabel.text = visit.rfe;
}
} break; } break;
Next section, etc, etc, etc.
Whenever i put the editingAccessoryType in, I go to edit the tableView and it doesn't show up. Any ideas? Am I missing some delegate method or something?
I also have a - (void)setEditing:(BOOL)editing animated:(BOOL)animated method set up. Would that make a difference? I'm kinda lost right now. Thanks in advance.