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

xslt - Substring before throwing error -

c# - Call C++ Native DLL in Managed Code -

Google Cloud Bigtable Durability/Availability Guarantees -