ios - How to make UITableView header to show only when dragging down table view -
i have uilabel
shows me current date added table view header. when app running can see header right start.
what after when app starts not see header, when try drag table view down, reveal label. , when releasing header should hidden again.
i think snapchat uses technique in stories screen.
any ideas how can achieved ?
i'm thinking setcontentoffset
when app starts move table view on top of header. how do know when table view dragged , released ?
you correct can use setcontentoffset move tableviewdown. can implement uiscrollviewdelegate method scrollviewwillenddragging(:withvelocity:targetcontentoffset:) tell when user lets go of tableview , call setcontentoffset(:animated:) animate tableview initial position.
Comments
Post a Comment