且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

添加搜索栏后,分页不起作用

更新时间:2023-12-03 13:37:40

如果您过度使用节方法中的行数,则必须调用super.

If you over ride the number of rows in section methods you have to call super.

在我的代码中,我遇到了这个问题.我通过将代码放在后面来解决

In my code i faced this issue. I solved by put the code follows

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    int rowCount = [super tableView:tableView numberOfRowsInSection:section];
    if (self.isEditing) {
        rowCount++;
    }
    return rowCount;
}