AXCaptionViewProtocol

protocol AXCaptionViewProtocol : NSObjectProtocol

AXCaptionViewProtocol

  • Whether or not the CaptionView should animate caption info changes - using Constants.frameAnimDuration as the animation duration.

    Declaration

    Swift

    var animateCaptionInfoChanges: Bool { get set }
  • The AXPhotosViewController will call this method when a new photo is ready to have its information displayed. The implementation should update the captionView with the attributed parameters.

    Declaration

    Swift

    func applyCaptionInfo(attributedTitle: NSAttributedString?, attributedDescription: NSAttributedString?, attributedCredit: NSAttributedString?)

    Parameters

    attributedTitle

    The attributed title of the new photo.

    attributedDescription

    The attributed description of the new photo.

    attributedCredit

    The attributed credit of the new photo.

  • The AXPhotosViewController uses this method to correctly size the caption view for a constrained width.

    Declaration

    Swift

    func sizeThatFits(_ size: CGSize) -> CGSize

    Parameters

    size

    The constrained size. Use the width of this value to layout subviews.

    Return Value

    A size that fits all subviews inside a constrained width.