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

Add/Delete Sections and Add/Delete CollectionView Cells #11

Closed
nelsaow opened this issue Jan 7, 2017 · 1 comment
Closed

Add/Delete Sections and Add/Delete CollectionView Cells #11

nelsaow opened this issue Jan 7, 2017 · 1 comment
Assignees
Labels

Comments

@nelsaow
Copy link

nelsaow commented Jan 7, 2017

Hi Giulio!

Great Project! Do you have any writing about Add/Delete Sections and Add/Delete CollectionView Cells from user interface, can you help me please. Thanks

@giulio92 giulio92 self-assigned this Jan 10, 2017
@giulio92
Copy link
Owner

giulio92 commented Jan 10, 2017

Hello @nelsaow,

You can add and delete UICollectionViewCells simply by calling UICollectionView's reloadData method, be sure to update the value inside collectionView(_:numberOfItemsInSection:) before calling it.
So for example if you have 20 UICollectionViewCells in a UICollectionView and you want to delete one or more just update the numberOfItemsInSection value from 20 to whatever number and call reloadData on the UICollectionView you're pointing to.
Since GLTableCollectionView is a UITableViewController you could also just call the reloadData method on the GLTableCollectionView to reload and update all the UICollectionViews with a single action.

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

No branches or pull requests

2 participants