2014-07-27 54 views

回答

2

呼叫showRightUtilityButtonsAnimated: method.I正在使用示例代碼given.Replace didSelectRowAtIndexPath並更改UMTableViewCellYourCellClassName

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 
    NSLog(@"cell selected at index path %ld:%ld", (long)indexPath.section, (long)indexPath.row); 
    NSLog(@"selected cell index path is %@", [self.tableView indexPathForSelectedRow]); 


    if (!tableView.isEditing) { 
     [tableView deselectRowAtIndexPath:indexPath animated:YES]; 
    } 

    //if you want to hide other cell which are opened first 
    for (UMTableViewCell *cell in [tableView visibleCells]) { 

     [cell hideUtilityButtonsAnimated:YES]; 
    } 

    UMTableViewCell *cell = (UMTableViewCell *)[tableView cellForRowAtIndexPath:indexPath]; 
    [cell showRightUtilityButtonsAnimated:YES]; 


} 
相關問題