Tuesday, 15 January 2013

ios - Conditionally show cells in a static cell tableview -



ios - Conditionally show cells in a static cell tableview -

i have static table view set in interface builder, in circumstances don't want cells show. what's best way accomplish static cells? i'd utilize static cells because a) makes sense because there no datasource, , b) i'm rendering static views using ibdesignable/ibinspectable , maintain way.

you should able add together uitableviewdelegate method tableview:heightforrowatindexpath: , homecoming 0 row don't want show.

- (cgfloat)tableview:(uitableview *)tableview heightforrowatindexpath:(nsindexpath *)indexpath { cgfloat rowheight = 44.0; if (indexpath.row == /* row want hide */) { rowheight = 0.0; } homecoming rowheight; }

ios xcode uitableview swift

No comments:

Post a Comment