ios - Set Table View Cell Height for Only One of Three Custom Cells -
i have 3 custom tableviewcells
. have 1 of 3 cells need set heightforrowatindexpath
in code because can't utilize autolayout in storyboard it.
is there way set heightforrowatindexpath
specific custom tableviewcell
?
my heightforrowatindexpath
:
- (cgfloat) tableview:(uitableview *)tableview heightforrowatindexpath:(nsindexpath *)indexpath { id model = self.combinedmodel[indexpath.row]; // custom table view cell 2 if ([model iskindofclass:[data self]]) { homecoming 500; } // custom table view cell 1 , 3 else { // not sure set here, need set without setting height } }
i next in code:
- (cgfloat) tableview:(uitableview *)tableview heightforrowatindexpath:(nsindexpath *)indexpath { id model = self.combinedmodel[indexpath.row]; // custom table view cell 2 if ([model iskindofclass:[data self]]) { homecoming 500; } else { homecoming tableview.rowheight; // homecoming default height } }
ios objective-c uitableview heightforrowatindexpath
No comments:
Post a Comment