alexhillc / AXPhotoViewer

An iOS/tvOS photo gallery viewer, useful for viewing a large (or small!) number of photos.
https://www.cocoacontrols.com/controls/axphotoviewer
MIT License
642 stars 120 forks source link

How to reload update? #46

Closed chrisvoronin closed 5 years ago

chrisvoronin commented 5 years ago

Is there a built in functionality to reload an updated model? For example we currently let user update the caption. However, I don't see a way to reload a photoAtIndexPath?

Also is there a way to delete an item out of datasource?

alexhillc commented 5 years ago

Hey @chrisvoronin - the PhotosViewController is dataSource-driven - you can trigger a "reload" by setting a new dataSource via photosViewController.dataSource = ...

Same goes for deleting. Just remove the item from the dataSource, and then trigger a reload by using the example above.

chrisvoronin commented 5 years ago

Thanks!