ios - How to dynamically resize UITableViewCell based on UITableView scrolling? -


i have tried looking answer question far haven't got luck.

context

i have uitableview inside standard uiviewcontroller (not uitableviewcontroller..). have subclassed uitableviewcell , cells in tableview same class.

requirement

i find efficient way resize cells based on scrolling of tableview. example, when cell @ bottom of visible list, height x. when cell moves on screen, height should proportionally increase 2x.

additional info

i close ditch uitableview way , start making own control implement such feat subclassing uiscrollview. however, see if possible before going path. did see interesting posts nothing put me on right path.

any hint or highly appreciated.

you need respond scroll view delegate method scrollviewdidscroll: , implement record cell @ top of table view , reload table view. table view delegate method tableview:heightforrowatindexpath: sets cell height relationship between index path , top cell index path.

your main issue performance while reloading table view time.

if wanted roll own solution along lines of above description anyway, able more efficient table view table view call tableview:heightforrowatindexpath: method once every row every reload in order calculate total height of table content.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -