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
646 stars 119 forks source link

# of # #37

Closed sadanro100 closed 5 years ago

sadanro100 commented 6 years ago

First of all thanks for the great lib!

I've been struggling to find a way to replace "of" with something else. I'd like to keep the internal incrementing logic as I swipe through the photos.

If I set the title property with something else, it overwrites the entire logic and I lose the index and the total amount of photos.

Thanks

alexhillc commented 6 years ago

Hey @sadanro100, you can subclass the AXPhotosViewController and override

willUpdate(overlayView:forPhoto:atIndex:totalNumberOfPhotos:)

From there, just use the values passed in that function to set the title property of the overlayView