ios - custom uitableviewcell label hide/show -


i have custom table view cell in table view controller. on cell there label want either show/hide based on row information. can show/hide label based on row information. possible expand or collapse height of tableview cell based on whether label present or not? expect 1 row of data label.

use -tableview:heightforrowatindexpath:

attach uitableviewdelegate uitableview's delegate. , implement above method , set height depending on if cell collapsed or expanded.

-(cgfloat)tableview:(uitableview *)tableview heightforrowatindexpath:(nsindexpath *)indexpath {     return (indexpath.row == _rowindexwithlabel) ? tableview.rowheight + _heightoflabel : tableview.rowheight; } 

Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -