level 5
会不会是和TabBer有冲突什么的
我没加TabBer前没这个问题
2016年01月18日 05点01分
7
level 5
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
NSString *collechLabelIdentifier = @"collechLabelIdentifier";
dishListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:collechLabelIdentifier];
if (cell == nil) {
cell = [[dishListTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:collechLabelIdentifier];
}
cell.collechResult = self.collechArray[indexPath.row];
return cell;
}
这是我的Cell
2016年01月18日 15点01分
11
level 5
-(NSArray<UITableViewRowAction *> *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath{
UITableViewRowAction *deleteRowAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"删除" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
searchResult *s = self.collechArray[indexPath.row];
[DatabaseTool delectData:[NSString stringWithFormat:@"%ld",s.ID]];
self.collechArray = [DatabaseTool query];
[self.collechTableView reloadData];
}];
return @[deleteRowAction];
}
这是我的左划删除按钮
2016年01月18日 15点01分
12
level 4
没看出来问题,建议在
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
加上frame属性给X定为0
cell.frame
同时
static NSString *collechLabelIdentifier = @"collechLabelIdentifier";
2016年01月19日 03点01分
15
试了一下!不是这里问题!效果还是一样
2016年01月20日 05点01分