swift - iOS tableview how can I check if it is scrolling up or down -
i learning how work tableviews , wondering how can figure out if tableview scrolling or down ? been trying various things such hasn't worked granted below scrollview , have tableview . suggestions great new @ ... func scrollviewwillbegindragging(_ scrollview: uiscrollview) { if scrollview.pangesturerecognizer.translation(in: scrollview).y < 0 { print("down") } else { print("up") } } this have in tableview code func tableview(_ tableview:uitableview, numberofrowsinsection section:int) -> int { return locations.count } func tableview(tableview: uitableview, willdisplaycell cell: uitableviewcell, forrowatindexpath indexpath: nsindexpath) { if indexpath.row == self.posts.count - 4 { reloadtable(latmin: self.latmin,latmax: self.latmax,lonmin: self.lonmin,lonmax: self.lonmax,my_id: myid) print("load more") } } func tableview(_ tableview: uitable...