Hello , I saw the example "Dynamic row height" in your demo app . I would like to know how to have the line height without using the dynamic DataSourceHelper but with the classical methods ( cellAt , numbersOfRowsInSection , etc ... )
Hi Mattia,
If you're implementing the IGGridViewDataSource protocol yourself, then you'll need to implement the datasource protocol method:
-(CGFloat)gridView:(IGGridView *)gridView heightForRowAtPath:(IGRowPath *)path
Hope this helps,
-SteveZ
thanks , I've seen the method , but how do I get the estimated height of TextLabel cell ( and width which is drawn ) ?
To get the width of the column:
CGFloat width = [gridView resolveActualWidthOfColumn:index location:IGGridViewFixedColumnDirectionNone];
To estimate the height, you'll have to resolve the string that you're going to put in the cell, and measure it.
CGSize size = [cellValue sizeWithFont:font constrainedToSize:CGSizeMake(width, 10000)]; // The 10000, is just a really large number, basically saying the height can be as big as it needs to be.
Hope this helps.
it worked , thanks a lot !