In My TableView I am calculating my cell’s height as per dynamic data,
Now here I want to do one thing,
I want to calculate table’s height for only one time ,
after that I want to store it in a array so that when that row come again it should not calculate the whole size.
for this I want to declare a dictionary. In that I want to access two things . Height in integer and status for height is calculated or not.
Now status will note status is true or not. If height is calculated then status is true and height will be stored.
now when I come to there again . it will check if status is true then height should be fetch from dictionary only .
how can I do this?
There is
-heightForRowAtIndexPathdelegate method for that:I wrote this code assumming that your dictionary is like:
You can make this dictionary in
-viewDidLoadlike:Then you can add this dictionary to some array and read it in
-heightForRow...