gpt4 book ai didi

ios - SWTableView 滑动单元格问题

转载 作者:行者123 更新时间:2023-11-29 11:43:00 26 4
gpt4 key购买 nike

我正在使用 SWTableView 向左滑动以向用户提供更多选项,我添加了 4 个元素,当我关闭单元格时,并非所有单元格都返回到该位置。请帮忙![See below image the swipe back not close all the buttons ] 1

最佳答案

您是否记得设置单元格的委托(delegate)?如 README 中所述?

- (UITableViewCell*)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath
{
static NSString *cellIdentifier = @"MyCustomCell";

MyCustomTableViewCell *cell = (MyCustomTableViewCell *)[tableView dequeueReusableCellWithIdentifier:cellIdentifier
forIndexPath:indexPath];

cell.leftUtilityButtons = [self leftButtons];
cell.rightUtilityButtons = [self rightButtons];
cell.delegate = self;

cell.customLabel.text = @"Some Text";
cell.customImageView.image = [UIImage imageNamed:@"MyAwesomeTableCellImage"];
[cell setCellHeight:cell.frame.size.height];
return cell;
}

关于ios - SWTableView 滑动单元格问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45433023/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com