Insert UITableView row without ANY animation

前端 未结 5 2104
感情败类
感情败类 2021-02-07 02:05
[self.tableView insertRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:row inSection:0]] 
                      withRowAnimation:UITableViewRowAnimationNone];
         


        
5条回答
  •  渐次进展
    2021-02-07 02:59

    Swift example (from my chat)

    UIView.performWithoutAnimation {
            messagesTable.insertRows(at: [IndexPath(row: messages.count - 1, section: 0)], with: .none)
        }
    

提交回复
热议问题