1
https://github.com/CEWendel/SWTableViewCellSWTableViewCell的RightUtilityButton如何當我點擊表格單元格
我希望SWTableViewCell的RightUtilityButton將直接顯示當我點擊直接顯示(不拖)的表格單元格。
SWTableViewCell似乎並沒有提供這種接口
https://github.com/CEWendel/SWTableViewCellSWTableViewCell的RightUtilityButton如何當我點擊表格單元格
我希望SWTableViewCell的RightUtilityButton將直接顯示當我點擊直接顯示(不拖)的表格單元格。
SWTableViewCell似乎並沒有提供這種接口
呼叫showRightUtilityButtonsAnimated:
method.I正在使用示例代碼given.Replace didSelectRowAtIndexPath
並更改UMTableViewCell
到YourCellClassName
- (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];
}