Scroll To Bottom of TableView

PHOTO EMBED

Tue Jan 18 2022 12:41:24 GMT+0000 (UTC)

Saved by @hasnat #ios #swift #scroll

func scrollToBottom(){
    DispatchQueue.main.async {
        let indexPath = IndexPath(row: self.dataArray.count-1, section: 0)
        self.tableView.scrollToRow(at: indexPath, at: .bottom, animated: true)
    }
}
content_copyCOPY