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

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -