UICollectionViewCell with Dynamic height having the use of NSURL for Image downloading

Hi, Currently, I'm busy with my one of the project having the concept
of Dynamic UI like Pinterest

I need the UI like above image . For this, I have used

UICollectionView

and tried to give dynamic height
for each and every cell. I couldn't get any success to achieve UI like
this. I had also used some customized

UICollectionView

namely
"

PSCollectionView

", "

PSTCollectionView

" etc..

In all examples, I found one common thing regarding images and their
height. They all fetches images from local source and stores the
height of images in local storage or directly fetches the height from
the images where I need to fetch images from Web-server using

NSURL

and then I can give the height to each and every cell.. But how can I
do this? Any idea about this ... Please let me know if you have any
proper solution.