ios - How to check how much the first row is hidden in UITableView without using contentOffset? -


i need know how of first cell hidden current scroll in uitableview. in other words, @ point in cell's coordinates, cell not covered yet?

the contentoffset cannot used because calculate myself.

you have indexpath first visible row, , convert origin cell's coordinates:

if let firstvisibleindexpath = indexpathsforvisiblerows?.first {      if let cell = cellforrowatindexpath(firstvisibleindexpath) {         let coveredheightoffirstvisiblecell = tableview.superview!.convertpoint(tableview.frame.origin, toview: cell).y     } } 

Comments

Popular posts from this blog

xml - Extract substrings with XSLT -

math - "ELO Rating" and how does "TSR Rating" work? -

How can do a tuple comparison in coffeescript similar to that in python? -