ios - UITableView Section Header Stop Position -


is possible give section header in ui tableview offset stop programmatically?

so, section header stop 100 px top?

i think should work:

override func scrollviewdidscroll(_ scrollview: uiscrollview) {     super.scrollviewdidscroll(scrollview)     let inset: cgfloat = 73     if scrollview.contentoffset.y < inset && scrollview.contentoffset.y > 0 {         scrollview.contentinset = uiedgeinsets(top: scrollview.contentoffset.y, left: 0, bottom: 0, right: 0)     } else {         if scrollview.contentoffset.y < 0 {             scrollview.contentinset = uiedgeinsets(top: 0, left: 0, bottom: 0, right: 0)         } else {             scrollview.contentinset = uiedgeinsets(top: inset, left: 0, bottom: 0, right: 0)         }     } } 

Comments

Popular posts from this blog

html - How to custom Bootstrap grid height? -

javascript - pass values from mssql to views in node -

javascript - Understanding ExtJS Framework Syntax -