objective c - IOS delete/hide table row section and cells? -


ive been struggling on couple of days trying number of different ways trying remove sections of table view.

exportsettings.h

@property (weak, nonatomic) iboutlet uitableviewrowaction *movemberfeatures; 

this connected movember section.

exportsettings.m

 - (cgfloat)tableview:(uitableview *)tableview heightforrowatindexpath:(nsindexpath *)indexpath  { uitableviewcell* cell = [super tableview:tableview cellforrowatindexpath:indexpath];   if(cell == self.movemberfeatures)     return 0; //set hidden cell's height 0  return [super tableview:tableview heightforrowatindexpath:indexpath]; } 

currently not building , not sure why. great![enter image description here

if(cell == self.movemberfeatures) 

you trying compare uitableviewcell uitableviewrowaction. that's build fail think.

you can see in documentation uitableviewrowactiondefines single action present when user swipes horizontally in table row. not @ suited want do.

use nsinteger associated section refer it.

as suggested bharat modi, use [tableview deletesections:[nsindexset indexsetwithindex:indexpath.section] withrowanimation:uitableviewrowanimationfade]; delete section table.


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -