AXPhotosViewControllerDelegate
protocol AXPhotosViewControllerDelegate : AnyObject, NSObjectProtocol
                AXPhotosViewControllerDelegate
- 
                  
                  
Called when the
AXPhotosViewControllernavigates to a new photo. This is defined as when the swipe percent between pages is greater than the threshold (>0.5).Declaration
Swift
func photosViewController(_ photosViewController: AXPhotosViewController, didNavigateTo photo: AXPhotoProtocol, at index: Int)Parameters
photosViewControllerThe
AXPhotosViewControllerthat is navigating.photoThe
AXPhotothat was navigated to.indexThe
indexin the dataSource of theAXPhotobeing transitioned to. - 
                  
                  
Called when the
AXPhotosViewControlleris configuring itsOverlayViewfor a new photo. This should be used to update the the overlay’s title or any other overlay-specific properties.Declaration
Swift
func photosViewController(_ photosViewController: AXPhotosViewController, willUpdate overlayView: AXOverlayView, for photo: AXPhotoProtocol, at index: Int, totalNumberOfPhotos: Int)Parameters
photosViewControllerThe
AXPhotosViewControllerthat is updating the overlay.overlayViewThe
AXOverlayViewthat is being updated.photoThe
AXPhotothe overlay is being configured for.indexThe index of the
AXPhotothat the overlay is being configured for.totalNumberOfPhotosThe total number of photos in the current
dataSource. - 
                  
                  
Called when the
AXPhotoViewControllerwill show/hide itsOverlayView. This method will be called inside of an animation context, so perform any coordinated animations here.Declaration
Swift
func photosViewController(_ photosViewController: AXPhotosViewController, overlayView: AXOverlayView, visibilityWillChange visible: Bool)Parameters
photosViewControllerThe
AXPhotosViewControllerthat is updating the overlay visibility.overlayViewThe
AXOverlayViewwhose visibility is changing.visibleA boolean that denotes whether or not the overlay will be visible or invisible.
 - 
                  
                  
If implemented and returns a valid zoom scale for the photo (valid meaning >= the photo’s minimum zoom scale), the underlying zooming image view will adopt the returned
maximumZoomScaleinstead of the default calculated by the library. A good implementation of this method will use a combination of the providedminimumZoomScaleandimageSizeto extrapolate amaximumZoomScaleto return. If theminimumZoomScaleis returned (ie.minimumZoomScale==maximumZoomScale), zooming will be disabled for this image.Declaration
Swift
func photosViewController(_ photosViewController: AXPhotosViewController, maximumZoomScaleFor photo: AXPhotoProtocol, minimumZoomScale: CGFloat, imageSize: CGSize) -> CGFloatParameters
photosViewControllerThe
AXPhotosViewControllerthat is updating the photo’s zoom scale.photoThe
AXPhotothat the zoom scale will affect.minimumZoomScaleThe minimum zoom scale that is calculated by the library. This value cannot be changed.
imageSizeThe size of the image that belongs to the
AXPhoto.Return Value
A “maximum” zoom scale that >=
minimumZoomScale. - 
                  
                  
Called when the action button is tapped for a photo. If no implementation is provided, will fall back to default action.
Declaration
Swift
func photosViewController(_ photosViewController: AXPhotosViewController, handleActionButtonTappedFor photo: AXPhotoProtocol)Parameters
photosViewControllerThe
AXPhotosViewControllerhandling the action.photoThe related
Photo. - 
                  
                  
Called when an action button action is completed.
Note
This is only called for the default action.Declaration
Swift
func photosViewController(_ photosViewController: AXPhotosViewController, actionCompletedWith activityType: UIActivity.ActivityType, for photo: AXPhotoProtocol)Parameters
photosViewControllerThe
AXPhotosViewControllerthat handled the action.photoThe related
AXPhoto. - 
                  
                  
Called just before the
AXPhotosViewControllerbegins its dismissalDeclaration
Swift
func photosViewControllerWillDismiss(_ photosViewController: AXPhotosViewController)Parameters
photosViewControllerThe view controller being dismissed
 - 
                  
                  
Called after the
AXPhotosViewControllercompletes its dismissalDeclaration
Swift
func photosViewControllerDidDismiss(_ photosViewController: AXPhotosViewController)Parameters
photosViewControllerThe dismissed view controller
 
            View on GitHub
          
      AXPhotosViewControllerDelegate Protocol Reference