Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for UICollectionView #11

Open
ipranay opened this issue May 12, 2015 · 3 comments
Open

Support for UICollectionView #11

ipranay opened this issue May 12, 2015 · 3 comments

Comments

@ipranay
Copy link

ipranay commented May 12, 2015

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.

@ipranay
Copy link
Author

ipranay commented May 12, 2015

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.

@davidman
Copy link
Owner

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.

@denghuihua
Copy link

I need to support UICollectionview,but there is bugs in my code ,Can you help me ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants