Support for UICollectionView
First of all... This library is awesome! Thanks for creating it. Is their any chance you plan on supporting UICollectionView as well?
I understand, that it might be way more complicated than a UITableView, due to the different custom layouts you could build.
I have tried this, in one of my tests:
self.collectionView.reloadData()
var origFrame = self.collectionView.frame
var frame = self.collectionView.frame
frame.size.height = self.collectionView.contentSize.height
frame.size.width = self.collectionView.contentSize.width
self.collectionView.frame = frame
UIGraphicsBeginImageContext(self.collectionView.bounds.size)
self.collectionView.layer.renderInContext(UIGraphicsGetCurrentContext())
var saveImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()
self.collectionView.frame = origFrame
I'm not sure if it is the best way to go about it.
Hi @ipranay, thanks for your comments, really glad to hear that :] Right now, I am not planning to add support for collection views, at least not in the near future. But, I think we can create a feature branch to do just that, so you can start with something and maybe others can join too. Thoughts? What you have done in the snippet above looks good, it could be the starting point to build upon it.
I need to support UICollectionview,but there is bugs in my code ,Can you help me ?