diff --git a/Supporting Files/Info.plist b/Supporting Files/Info.plist index 12bd5e1..b892276 100644 --- a/Supporting Files/Info.plist +++ b/Supporting Files/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 136 + 140 NSPrincipalClass diff --git a/docs/Classes.html b/docs/Classes.html index 9fd3472..9543f42 100644 --- a/docs/Classes.html +++ b/docs/Classes.html @@ -15,7 +15,7 @@

Gifu Docs (100% documented)

View on GitHub

-

Install in Dash

+

Install in Dash

@@ -127,7 +127,7 @@ diff --git a/docs/Classes/Animator.html b/docs/Classes/Animator.html index 29d8731..801f0a8 100644 --- a/docs/Classes/Animator.html +++ b/docs/Classes/Animator.html @@ -16,7 +16,7 @@

Gifu Docs (100% documented)

View on GitHub

-

Install in Dash

+

Install in Dash

@@ -124,7 +124,7 @@ diff --git a/docs/Classes/GIFImageView.html b/docs/Classes/GIFImageView.html index b584c52..242157e 100644 --- a/docs/Classes/GIFImageView.html +++ b/docs/Classes/GIFImageView.html @@ -16,7 +16,7 @@
@@ -147,7 +147,7 @@ diff --git a/docs/Protocols.html b/docs/Protocols.html index 0a0c464..a2da918 100644 --- a/docs/Protocols.html +++ b/docs/Protocols.html @@ -15,7 +15,7 @@
@@ -123,7 +123,7 @@ diff --git a/docs/Protocols/GIFAnimatable.html b/docs/Protocols/GIFAnimatable.html index 46020a3..7b242fe 100644 --- a/docs/Protocols/GIFAnimatable.html +++ b/docs/Protocols/GIFAnimatable.html @@ -16,7 +16,7 @@
@@ -338,9 +338,9 @@
  • - - - animate(withGIFNamed:loopCount:) + + + animate(withGIFNamed:loopCount:completionHandler:) Extension method @@ -358,7 +358,7 @@

    Declaration

    Swift

    -
    public func animate(withGIFNamed imageName: String, loopCount: Int = 0)
    +
    public func animate(withGIFNamed imageName: String, loopCount: Int = 0, completionHandler: (() -> Void)? = nil)
    @@ -390,6 +390,18 @@
  • + + + + completionHandler + + + +
    +

    Completion callback function

    +
    + +
    @@ -399,9 +411,9 @@
  • - - - animate(withGIFData:loopCount:) + + + animate(withGIFData:loopCount:completionHandler:) Extension method @@ -419,7 +431,7 @@

    Declaration

    Swift

    -
    public func animate(withGIFData imageData: Data, loopCount: Int = 0)
    +
    public func animate(withGIFData imageData: Data, loopCount: Int = 0, completionHandler: (() -> Void)? = nil)
    @@ -451,6 +463,18 @@
  • + + + + completionHandler + + + +
    +

    Completion callback function

    +
    + +
    @@ -460,9 +484,9 @@
  • - - - animate(withGIFURL:loopCount:) + + + animate(withGIFURL:loopCount:completionHandler:) Extension method @@ -480,7 +504,7 @@

    Declaration

    Swift

    -
    public func animate(withGIFURL imageURL: URL, loopCount: Int = 0)
    +
    public func animate(withGIFURL imageURL: URL, loopCount: Int = 0, completionHandler: (() -> Void)? = nil)
    @@ -512,6 +536,18 @@
  • + + + + completionHandler + + + +
    +

    Completion callback function

    +
    + + @@ -930,7 +966,7 @@ diff --git a/docs/Protocols/ImageContainer.html b/docs/Protocols/ImageContainer.html index 3ec3143..0ca73d5 100644 --- a/docs/Protocols/ImageContainer.html +++ b/docs/Protocols/ImageContainer.html @@ -16,7 +16,7 @@

    Gifu Docs (100% documented)

    View on GitHub

    -

    Install in Dash

    +

    Install in Dash

    @@ -101,7 +101,7 @@ diff --git a/docs/docsets/Gifu.docset/Contents/Resources/Documents/Classes.html b/docs/docsets/Gifu.docset/Contents/Resources/Documents/Classes.html index 9fd3472..9543f42 100644 --- a/docs/docsets/Gifu.docset/Contents/Resources/Documents/Classes.html +++ b/docs/docsets/Gifu.docset/Contents/Resources/Documents/Classes.html @@ -15,7 +15,7 @@

    Gifu Docs (100% documented)

    View on GitHub

    -

    Install in Dash

    +

    Install in Dash

    @@ -127,7 +127,7 @@ diff --git a/docs/docsets/Gifu.docset/Contents/Resources/Documents/Classes/Animator.html b/docs/docsets/Gifu.docset/Contents/Resources/Documents/Classes/Animator.html index 29d8731..801f0a8 100644 --- a/docs/docsets/Gifu.docset/Contents/Resources/Documents/Classes/Animator.html +++ b/docs/docsets/Gifu.docset/Contents/Resources/Documents/Classes/Animator.html @@ -16,7 +16,7 @@
    @@ -124,7 +124,7 @@ diff --git a/docs/docsets/Gifu.docset/Contents/Resources/Documents/Classes/GIFImageView.html b/docs/docsets/Gifu.docset/Contents/Resources/Documents/Classes/GIFImageView.html index b584c52..242157e 100644 --- a/docs/docsets/Gifu.docset/Contents/Resources/Documents/Classes/GIFImageView.html +++ b/docs/docsets/Gifu.docset/Contents/Resources/Documents/Classes/GIFImageView.html @@ -16,7 +16,7 @@
    @@ -147,7 +147,7 @@ diff --git a/docs/docsets/Gifu.docset/Contents/Resources/Documents/Protocols.html b/docs/docsets/Gifu.docset/Contents/Resources/Documents/Protocols.html index 0a0c464..a2da918 100644 --- a/docs/docsets/Gifu.docset/Contents/Resources/Documents/Protocols.html +++ b/docs/docsets/Gifu.docset/Contents/Resources/Documents/Protocols.html @@ -15,7 +15,7 @@
    @@ -123,7 +123,7 @@ diff --git a/docs/docsets/Gifu.docset/Contents/Resources/Documents/Protocols/GIFAnimatable.html b/docs/docsets/Gifu.docset/Contents/Resources/Documents/Protocols/GIFAnimatable.html index 46020a3..7b242fe 100644 --- a/docs/docsets/Gifu.docset/Contents/Resources/Documents/Protocols/GIFAnimatable.html +++ b/docs/docsets/Gifu.docset/Contents/Resources/Documents/Protocols/GIFAnimatable.html @@ -16,7 +16,7 @@
    @@ -338,9 +338,9 @@
  • - - - animate(withGIFNamed:loopCount:) + + + animate(withGIFNamed:loopCount:completionHandler:) Extension method @@ -358,7 +358,7 @@

    Declaration

    Swift

    -
    public func animate(withGIFNamed imageName: String, loopCount: Int = 0)
    +
    public func animate(withGIFNamed imageName: String, loopCount: Int = 0, completionHandler: (() -> Void)? = nil)
    @@ -390,6 +390,18 @@
  • + + + + completionHandler + + + +
    +

    Completion callback function

    +
    + +
    @@ -399,9 +411,9 @@
  • - - - animate(withGIFData:loopCount:) + + + animate(withGIFData:loopCount:completionHandler:) Extension method @@ -419,7 +431,7 @@

    Declaration

    Swift

    -
    public func animate(withGIFData imageData: Data, loopCount: Int = 0)
    +
    public func animate(withGIFData imageData: Data, loopCount: Int = 0, completionHandler: (() -> Void)? = nil)
    @@ -451,6 +463,18 @@
  • + + + + completionHandler + + + +
    +

    Completion callback function

    +
    + +
    @@ -460,9 +484,9 @@
  • - - - animate(withGIFURL:loopCount:) + + + animate(withGIFURL:loopCount:completionHandler:) Extension method @@ -480,7 +504,7 @@

    Declaration

    Swift

    -
    public func animate(withGIFURL imageURL: URL, loopCount: Int = 0)
    +
    public func animate(withGIFURL imageURL: URL, loopCount: Int = 0, completionHandler: (() -> Void)? = nil)
    @@ -512,6 +536,18 @@
  • + + + + completionHandler + + + +
    +

    Completion callback function

    +
    + +
    @@ -930,7 +966,7 @@ diff --git a/docs/docsets/Gifu.docset/Contents/Resources/Documents/Protocols/ImageContainer.html b/docs/docsets/Gifu.docset/Contents/Resources/Documents/Protocols/ImageContainer.html index 3ec3143..0ca73d5 100644 --- a/docs/docsets/Gifu.docset/Contents/Resources/Documents/Protocols/ImageContainer.html +++ b/docs/docsets/Gifu.docset/Contents/Resources/Documents/Protocols/ImageContainer.html @@ -16,7 +16,7 @@

    Gifu Docs (100% documented)

    View on GitHub

    -

    Install in Dash

    +

    Install in Dash

    @@ -101,7 +101,7 @@ diff --git a/docs/docsets/Gifu.docset/Contents/Resources/Documents/index.html b/docs/docsets/Gifu.docset/Contents/Resources/Documents/index.html index 527df1b..9267874 100644 --- a/docs/docsets/Gifu.docset/Contents/Resources/Documents/index.html +++ b/docs/docsets/Gifu.docset/Contents/Resources/Documents/index.html @@ -15,7 +15,7 @@

    Gifu Docs (100% documented)

    View on GitHub

    -

    Install in Dash

    +

    Install in Dash

    @@ -58,11 +58,9 @@

    Logo

    -

    GitHub release Bitrise Carthage compatible Join the chat at https://gitter.im/kaishin/gifu Swift 3.0.x platforms

    +

    GitHub release Bitrise Carthage compatible Swift 4.0 platforms

    Gifu adds protocol-based, performance-aware animated GIF support to UIKit. (It’s also a prefecture in Japan).

    - -

    ⚠ The master branch works with Xcode 9 and iOS 11, which are both in beta. Use v2.0 for the stable version.

    Install

    Carthage

    @@ -168,7 +166,9 @@ containing 10 frames, Gifu will load the current frame (red), buffer the next tw

    The simplest way to get started is initializing a GIFAnimatable class in code or in a storyboard, then calling animate(:) on it.

    let imageView = GIFImageView(frame: CGRect(x: 0, y: 0, width: 200, height: 100))
    -imageView.animate(withGIFNamed: "mugen")
    +imageView.animate(withGIFNamed: "mugen") {
    +  print("It's animating!")
    +}
     

    You can also prepare for the animation when the view loads and only start animating after a user interaction.

    @@ -176,7 +176,9 @@ containing 10 frames, Gifu will load the current frame (red), buffer the next tw override func viewDidLoad() { super.viewDidLoad() - imageView.prepareForAnimation(withGIFNamed: "mugen") + imageView.prepareForAnimation(withGIFNamed: "mugen") { + print("Ready to animate!") + } } @IBAction func toggleAnimation(_ sender: AnyObject) { @@ -204,8 +206,8 @@ containing 10 frames, Gifu will load the current frame (red), buffer the next tw

    License

    @@ -214,7 +216,7 @@ containing 10 frames, Gifu will load the current frame (red), buffer the next tw diff --git a/docs/docsets/Gifu.docset/Contents/Resources/Documents/search.json b/docs/docsets/Gifu.docset/Contents/Resources/Documents/search.json index 32cefa2..a3afd9f 100644 --- a/docs/docsets/Gifu.docset/Contents/Resources/Documents/search.json +++ b/docs/docsets/Gifu.docset/Contents/Resources/Documents/search.json @@ -1 +1 @@ -{"Protocols/ImageContainer.html#/s:4Gifu14ImageContainerP5imageSo7UIImageCSgv":{"name":"image","abstract":"

    Used for displaying the animation frames.

    ","parent_name":"ImageContainer"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatableP8animatorAA8AnimatorCSgv":{"name":"animator","abstract":"

    Responsible for managing the animation frames.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatableP5layerSo7CALayerCv":{"name":"layer","abstract":"

    Notifies the instance that it needs display.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatableP5frameSC6CGRectVv":{"name":"frame","abstract":"

    View frame used for resizing the frames.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatableP11contentModeSC013UIViewContentD0Ov":{"name":"contentMode","abstract":"

    Content mode used for resizing the frames.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePA2aBRzAA14ImageContainerRzlE20intrinsicContentSizeSC6CGSizeVv":{"name":"intrinsicContentSize","abstract":"

    Returns the intrinsic content size based on the size of the image.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE15gifLoopDurationSdv":{"name":"gifLoopDuration","abstract":"

    Total duration of one animation loop

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE11activeFrameSo7UIImageCSgv":{"name":"activeFrame","abstract":"

    Returns the active frame if available.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE10frameCountSiv":{"name":"frameCount","abstract":"

    Total frame count of the GIF.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE14isAnimatingGIFSbv":{"name":"isAnimatingGIF","abstract":"

    Introspect whether the instance is animating.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE7animateySS12withGIFNamed_Si9loopCounttF":{"name":"animate(withGIFNamed:loopCount:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE7animatey10Foundation4DataV11withGIFData_Si9loopCounttF":{"name":"animate(withGIFData:loopCount:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE7animatey10Foundation3URLV10withGIFURL_Si9loopCounttF":{"name":"animate(withGIFURL:loopCount:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationySS12withGIFNamed_Si9loopCountyycSg17completionHandlertF":{"name":"prepareForAnimation(withGIFNamed:loopCount:completionHandler:)","abstract":"

    Prepares the animator instance for animation.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationy10Foundation4DataV11withGIFData_Si9loopCountyycSg17completionHandlertF":{"name":"prepareForAnimation(withGIFData:loopCount:completionHandler:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationy10Foundation3URLV10withGIFURL_Si9loopCountyycSg17completionHandlertF":{"name":"prepareForAnimation(withGIFURL:loopCount:completionHandler:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE15prepareForReuseyyF":{"name":"prepareForReuse()","abstract":"

    Stop animating and free up GIF data from memory.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE17startAnimatingGIFyyF":{"name":"startAnimatingGIF()","abstract":"

    Start animating GIF.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE16stopAnimatingGIFyyF":{"name":"stopAnimatingGIF()","abstract":"

    Stop animating GIF.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE21setShouldResizeFramesySbF":{"name":"setShouldResizeFrames(_:)","abstract":"

    Whether the frame images should be resized or not. The default is false, which means that the frame images retain their original size.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19setFrameBufferCountySiF":{"name":"setFrameBufferCount(_:)","abstract":"

    Sets the number of frames that should be buffered. Default is 50. A high number will result in more memory usage and less CPU load, and vice versa.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19updateImageIfNeededyyF":{"name":"updateImageIfNeeded()","abstract":"

    Updates the image with a new frame if necessary.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html":{"name":"GIFAnimatable","abstract":"

    The protocol that view classes need to conform to to enable animated GIF support.

    "},"Protocols/ImageContainer.html":{"name":"ImageContainer","abstract":"

    A single-property protocol that animatable classes can optionally conform to.

    "},"Classes/Animator.html#/s:4Gifu8AnimatorCAcA13GIFAnimatable_p12withDelegate_tcfc":{"name":"init(withDelegate:)","abstract":"

    Creates a new animator with a delegate.

    ","parent_name":"Animator"},"Classes/GIFImageView.html#/s:4Gifu12GIFImageViewC8animatorAA8AnimatorCSgv":{"name":"animator","abstract":"

    A lazy animator.

    ","parent_name":"GIFImageView"},"Classes/GIFImageView.html#/c:@M@Gifu@objc(cs)GIFImageView(im)displayLayer:":{"name":"display(_:)","abstract":"

    Layer delegate method called periodically by the layer. Should not be called manually.

    ","parent_name":"GIFImageView"},"Classes/GIFImageView.html":{"name":"GIFImageView","abstract":"

    Example class that conforms to GIFAnimatable. Uses default values for the animator frame buffer count and resize behavior. You can either use it directly in your code or use it as a blueprint for your own subclass.

    "},"Classes/Animator.html":{"name":"Animator","abstract":"

    Responsible for parsing GIF data and decoding the individual frames.

    "},"Classes.html":{"name":"Classes","abstract":"

    The following classes are available globally.

    "},"Protocols.html":{"name":"Protocols","abstract":"

    The following protocols are available globally.

    "}} \ No newline at end of file +{"Protocols/ImageContainer.html#/s:4Gifu14ImageContainerP5imageSo7UIImageCSgv":{"name":"image","abstract":"

    Used for displaying the animation frames.

    ","parent_name":"ImageContainer"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatableP8animatorAA8AnimatorCSgv":{"name":"animator","abstract":"

    Responsible for managing the animation frames.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatableP5layerSo7CALayerCv":{"name":"layer","abstract":"

    Notifies the instance that it needs display.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatableP5frameSC6CGRectVv":{"name":"frame","abstract":"

    View frame used for resizing the frames.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatableP11contentModeSC013UIViewContentD0Ov":{"name":"contentMode","abstract":"

    Content mode used for resizing the frames.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePA2aBRzAA14ImageContainerRzlE20intrinsicContentSizeSC6CGSizeVv":{"name":"intrinsicContentSize","abstract":"

    Returns the intrinsic content size based on the size of the image.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE15gifLoopDurationSdv":{"name":"gifLoopDuration","abstract":"

    Total duration of one animation loop

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE11activeFrameSo7UIImageCSgv":{"name":"activeFrame","abstract":"

    Returns the active frame if available.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE10frameCountSiv":{"name":"frameCount","abstract":"

    Total frame count of the GIF.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE14isAnimatingGIFSbv":{"name":"isAnimatingGIF","abstract":"

    Introspect whether the instance is animating.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE7animateySS12withGIFNamed_Si9loopCountyycSg17completionHandlertF":{"name":"animate(withGIFNamed:loopCount:completionHandler:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE7animatey10Foundation4DataV11withGIFData_Si9loopCountyycSg17completionHandlertF":{"name":"animate(withGIFData:loopCount:completionHandler:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE7animatey10Foundation3URLV10withGIFURL_Si9loopCountyycSg17completionHandlertF":{"name":"animate(withGIFURL:loopCount:completionHandler:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationySS12withGIFNamed_Si9loopCountyycSg17completionHandlertF":{"name":"prepareForAnimation(withGIFNamed:loopCount:completionHandler:)","abstract":"

    Prepares the animator instance for animation.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationy10Foundation4DataV11withGIFData_Si9loopCountyycSg17completionHandlertF":{"name":"prepareForAnimation(withGIFData:loopCount:completionHandler:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationy10Foundation3URLV10withGIFURL_Si9loopCountyycSg17completionHandlertF":{"name":"prepareForAnimation(withGIFURL:loopCount:completionHandler:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE15prepareForReuseyyF":{"name":"prepareForReuse()","abstract":"

    Stop animating and free up GIF data from memory.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE17startAnimatingGIFyyF":{"name":"startAnimatingGIF()","abstract":"

    Start animating GIF.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE16stopAnimatingGIFyyF":{"name":"stopAnimatingGIF()","abstract":"

    Stop animating GIF.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE21setShouldResizeFramesySbF":{"name":"setShouldResizeFrames(_:)","abstract":"

    Whether the frame images should be resized or not. The default is false, which means that the frame images retain their original size.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19setFrameBufferCountySiF":{"name":"setFrameBufferCount(_:)","abstract":"

    Sets the number of frames that should be buffered. Default is 50. A high number will result in more memory usage and less CPU load, and vice versa.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19updateImageIfNeededyyF":{"name":"updateImageIfNeeded()","abstract":"

    Updates the image with a new frame if necessary.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html":{"name":"GIFAnimatable","abstract":"

    The protocol that view classes need to conform to to enable animated GIF support.

    "},"Protocols/ImageContainer.html":{"name":"ImageContainer","abstract":"

    A single-property protocol that animatable classes can optionally conform to.

    "},"Classes/Animator.html#/s:4Gifu8AnimatorCAcA13GIFAnimatable_p12withDelegate_tcfc":{"name":"init(withDelegate:)","abstract":"

    Creates a new animator with a delegate.

    ","parent_name":"Animator"},"Classes/GIFImageView.html#/s:4Gifu12GIFImageViewC8animatorAA8AnimatorCSgv":{"name":"animator","abstract":"

    A lazy animator.

    ","parent_name":"GIFImageView"},"Classes/GIFImageView.html#/c:@M@Gifu@objc(cs)GIFImageView(im)displayLayer:":{"name":"display(_:)","abstract":"

    Layer delegate method called periodically by the layer. Should not be called manually.

    ","parent_name":"GIFImageView"},"Classes/GIFImageView.html":{"name":"GIFImageView","abstract":"

    Example class that conforms to GIFAnimatable. Uses default values for the animator frame buffer count and resize behavior. You can either use it directly in your code or use it as a blueprint for your own subclass.

    "},"Classes/Animator.html":{"name":"Animator","abstract":"

    Responsible for parsing GIF data and decoding the individual frames.

    "},"Classes.html":{"name":"Classes","abstract":"

    The following classes are available globally.

    "},"Protocols.html":{"name":"Protocols","abstract":"

    The following protocols are available globally.

    "}} \ No newline at end of file diff --git a/docs/docsets/Gifu.docset/Contents/Resources/docSet.dsidx b/docs/docsets/Gifu.docset/Contents/Resources/docSet.dsidx index 87f765a..d13afb4 100644 Binary files a/docs/docsets/Gifu.docset/Contents/Resources/docSet.dsidx and b/docs/docsets/Gifu.docset/Contents/Resources/docSet.dsidx differ diff --git a/docs/docsets/Gifu.tgz b/docs/docsets/Gifu.tgz index 3e962f7..cb7c55f 100644 Binary files a/docs/docsets/Gifu.tgz and b/docs/docsets/Gifu.tgz differ diff --git a/docs/docsets/Gifu.xml b/docs/docsets/Gifu.xml index ad51bd4..56c2eef 100644 --- a/docs/docsets/Gifu.xml +++ b/docs/docsets/Gifu.xml @@ -1 +1 @@ -1.2.1https://pyroh.github.io/docsets/Gifu.tgz +3.0.0https://kaishin.github.io/docsets/Gifu.tgz diff --git a/docs/index.html b/docs/index.html index 527df1b..9267874 100644 --- a/docs/index.html +++ b/docs/index.html @@ -15,7 +15,7 @@
    @@ -58,11 +58,9 @@

    Logo

    -

    GitHub release Bitrise Carthage compatible Join the chat at https://gitter.im/kaishin/gifu Swift 3.0.x platforms

    +

    GitHub release Bitrise Carthage compatible Swift 4.0 platforms

    Gifu adds protocol-based, performance-aware animated GIF support to UIKit. (It’s also a prefecture in Japan).

    - -

    ⚠ The master branch works with Xcode 9 and iOS 11, which are both in beta. Use v2.0 for the stable version.

    Install

    Carthage

    @@ -168,7 +166,9 @@ containing 10 frames, Gifu will load the current frame (red), buffer the next tw

    The simplest way to get started is initializing a GIFAnimatable class in code or in a storyboard, then calling animate(:) on it.

    let imageView = GIFImageView(frame: CGRect(x: 0, y: 0, width: 200, height: 100))
    -imageView.animate(withGIFNamed: "mugen")
    +imageView.animate(withGIFNamed: "mugen") {
    +  print("It's animating!")
    +}
     

    You can also prepare for the animation when the view loads and only start animating after a user interaction.

    @@ -176,7 +176,9 @@ containing 10 frames, Gifu will load the current frame (red), buffer the next tw override func viewDidLoad() { super.viewDidLoad() - imageView.prepareForAnimation(withGIFNamed: "mugen") + imageView.prepareForAnimation(withGIFNamed: "mugen") { + print("Ready to animate!") + } } @IBAction func toggleAnimation(_ sender: AnyObject) { @@ -204,8 +206,8 @@ containing 10 frames, Gifu will load the current frame (red), buffer the next tw
    • iOS 9.0+
    • -
    • Swift 3.0
    • -
    • Xcode 8.0
    • +
    • Swift 4.0
    • +
    • Xcode 9.0

    License

    @@ -214,7 +216,7 @@ containing 10 frames, Gifu will load the current frame (red), buffer the next tw diff --git a/docs/search.json b/docs/search.json index 32cefa2..a3afd9f 100644 --- a/docs/search.json +++ b/docs/search.json @@ -1 +1 @@ -{"Protocols/ImageContainer.html#/s:4Gifu14ImageContainerP5imageSo7UIImageCSgv":{"name":"image","abstract":"

    Used for displaying the animation frames.

    ","parent_name":"ImageContainer"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatableP8animatorAA8AnimatorCSgv":{"name":"animator","abstract":"

    Responsible for managing the animation frames.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatableP5layerSo7CALayerCv":{"name":"layer","abstract":"

    Notifies the instance that it needs display.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatableP5frameSC6CGRectVv":{"name":"frame","abstract":"

    View frame used for resizing the frames.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatableP11contentModeSC013UIViewContentD0Ov":{"name":"contentMode","abstract":"

    Content mode used for resizing the frames.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePA2aBRzAA14ImageContainerRzlE20intrinsicContentSizeSC6CGSizeVv":{"name":"intrinsicContentSize","abstract":"

    Returns the intrinsic content size based on the size of the image.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE15gifLoopDurationSdv":{"name":"gifLoopDuration","abstract":"

    Total duration of one animation loop

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE11activeFrameSo7UIImageCSgv":{"name":"activeFrame","abstract":"

    Returns the active frame if available.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE10frameCountSiv":{"name":"frameCount","abstract":"

    Total frame count of the GIF.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE14isAnimatingGIFSbv":{"name":"isAnimatingGIF","abstract":"

    Introspect whether the instance is animating.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE7animateySS12withGIFNamed_Si9loopCounttF":{"name":"animate(withGIFNamed:loopCount:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE7animatey10Foundation4DataV11withGIFData_Si9loopCounttF":{"name":"animate(withGIFData:loopCount:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE7animatey10Foundation3URLV10withGIFURL_Si9loopCounttF":{"name":"animate(withGIFURL:loopCount:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationySS12withGIFNamed_Si9loopCountyycSg17completionHandlertF":{"name":"prepareForAnimation(withGIFNamed:loopCount:completionHandler:)","abstract":"

    Prepares the animator instance for animation.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationy10Foundation4DataV11withGIFData_Si9loopCountyycSg17completionHandlertF":{"name":"prepareForAnimation(withGIFData:loopCount:completionHandler:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationy10Foundation3URLV10withGIFURL_Si9loopCountyycSg17completionHandlertF":{"name":"prepareForAnimation(withGIFURL:loopCount:completionHandler:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE15prepareForReuseyyF":{"name":"prepareForReuse()","abstract":"

    Stop animating and free up GIF data from memory.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE17startAnimatingGIFyyF":{"name":"startAnimatingGIF()","abstract":"

    Start animating GIF.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE16stopAnimatingGIFyyF":{"name":"stopAnimatingGIF()","abstract":"

    Stop animating GIF.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE21setShouldResizeFramesySbF":{"name":"setShouldResizeFrames(_:)","abstract":"

    Whether the frame images should be resized or not. The default is false, which means that the frame images retain their original size.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19setFrameBufferCountySiF":{"name":"setFrameBufferCount(_:)","abstract":"

    Sets the number of frames that should be buffered. Default is 50. A high number will result in more memory usage and less CPU load, and vice versa.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19updateImageIfNeededyyF":{"name":"updateImageIfNeeded()","abstract":"

    Updates the image with a new frame if necessary.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html":{"name":"GIFAnimatable","abstract":"

    The protocol that view classes need to conform to to enable animated GIF support.

    "},"Protocols/ImageContainer.html":{"name":"ImageContainer","abstract":"

    A single-property protocol that animatable classes can optionally conform to.

    "},"Classes/Animator.html#/s:4Gifu8AnimatorCAcA13GIFAnimatable_p12withDelegate_tcfc":{"name":"init(withDelegate:)","abstract":"

    Creates a new animator with a delegate.

    ","parent_name":"Animator"},"Classes/GIFImageView.html#/s:4Gifu12GIFImageViewC8animatorAA8AnimatorCSgv":{"name":"animator","abstract":"

    A lazy animator.

    ","parent_name":"GIFImageView"},"Classes/GIFImageView.html#/c:@M@Gifu@objc(cs)GIFImageView(im)displayLayer:":{"name":"display(_:)","abstract":"

    Layer delegate method called periodically by the layer. Should not be called manually.

    ","parent_name":"GIFImageView"},"Classes/GIFImageView.html":{"name":"GIFImageView","abstract":"

    Example class that conforms to GIFAnimatable. Uses default values for the animator frame buffer count and resize behavior. You can either use it directly in your code or use it as a blueprint for your own subclass.

    "},"Classes/Animator.html":{"name":"Animator","abstract":"

    Responsible for parsing GIF data and decoding the individual frames.

    "},"Classes.html":{"name":"Classes","abstract":"

    The following classes are available globally.

    "},"Protocols.html":{"name":"Protocols","abstract":"

    The following protocols are available globally.

    "}} \ No newline at end of file +{"Protocols/ImageContainer.html#/s:4Gifu14ImageContainerP5imageSo7UIImageCSgv":{"name":"image","abstract":"

    Used for displaying the animation frames.

    ","parent_name":"ImageContainer"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatableP8animatorAA8AnimatorCSgv":{"name":"animator","abstract":"

    Responsible for managing the animation frames.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatableP5layerSo7CALayerCv":{"name":"layer","abstract":"

    Notifies the instance that it needs display.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatableP5frameSC6CGRectVv":{"name":"frame","abstract":"

    View frame used for resizing the frames.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatableP11contentModeSC013UIViewContentD0Ov":{"name":"contentMode","abstract":"

    Content mode used for resizing the frames.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePA2aBRzAA14ImageContainerRzlE20intrinsicContentSizeSC6CGSizeVv":{"name":"intrinsicContentSize","abstract":"

    Returns the intrinsic content size based on the size of the image.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE15gifLoopDurationSdv":{"name":"gifLoopDuration","abstract":"

    Total duration of one animation loop

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE11activeFrameSo7UIImageCSgv":{"name":"activeFrame","abstract":"

    Returns the active frame if available.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE10frameCountSiv":{"name":"frameCount","abstract":"

    Total frame count of the GIF.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE14isAnimatingGIFSbv":{"name":"isAnimatingGIF","abstract":"

    Introspect whether the instance is animating.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE7animateySS12withGIFNamed_Si9loopCountyycSg17completionHandlertF":{"name":"animate(withGIFNamed:loopCount:completionHandler:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE7animatey10Foundation4DataV11withGIFData_Si9loopCountyycSg17completionHandlertF":{"name":"animate(withGIFData:loopCount:completionHandler:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE7animatey10Foundation3URLV10withGIFURL_Si9loopCountyycSg17completionHandlertF":{"name":"animate(withGIFURL:loopCount:completionHandler:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationySS12withGIFNamed_Si9loopCountyycSg17completionHandlertF":{"name":"prepareForAnimation(withGIFNamed:loopCount:completionHandler:)","abstract":"

    Prepares the animator instance for animation.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationy10Foundation4DataV11withGIFData_Si9loopCountyycSg17completionHandlertF":{"name":"prepareForAnimation(withGIFData:loopCount:completionHandler:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19prepareForAnimationy10Foundation3URLV10withGIFURL_Si9loopCountyycSg17completionHandlertF":{"name":"prepareForAnimation(withGIFURL:loopCount:completionHandler:)","abstract":"

    Prepare for animation and start animating immediately.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE15prepareForReuseyyF":{"name":"prepareForReuse()","abstract":"

    Stop animating and free up GIF data from memory.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE17startAnimatingGIFyyF":{"name":"startAnimatingGIF()","abstract":"

    Start animating GIF.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE16stopAnimatingGIFyyF":{"name":"stopAnimatingGIF()","abstract":"

    Stop animating GIF.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE21setShouldResizeFramesySbF":{"name":"setShouldResizeFrames(_:)","abstract":"

    Whether the frame images should be resized or not. The default is false, which means that the frame images retain their original size.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19setFrameBufferCountySiF":{"name":"setFrameBufferCount(_:)","abstract":"

    Sets the number of frames that should be buffered. Default is 50. A high number will result in more memory usage and less CPU load, and vice versa.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html#/s:4Gifu13GIFAnimatablePAAE19updateImageIfNeededyyF":{"name":"updateImageIfNeeded()","abstract":"

    Updates the image with a new frame if necessary.

    ","parent_name":"GIFAnimatable"},"Protocols/GIFAnimatable.html":{"name":"GIFAnimatable","abstract":"

    The protocol that view classes need to conform to to enable animated GIF support.

    "},"Protocols/ImageContainer.html":{"name":"ImageContainer","abstract":"

    A single-property protocol that animatable classes can optionally conform to.

    "},"Classes/Animator.html#/s:4Gifu8AnimatorCAcA13GIFAnimatable_p12withDelegate_tcfc":{"name":"init(withDelegate:)","abstract":"

    Creates a new animator with a delegate.

    ","parent_name":"Animator"},"Classes/GIFImageView.html#/s:4Gifu12GIFImageViewC8animatorAA8AnimatorCSgv":{"name":"animator","abstract":"

    A lazy animator.

    ","parent_name":"GIFImageView"},"Classes/GIFImageView.html#/c:@M@Gifu@objc(cs)GIFImageView(im)displayLayer:":{"name":"display(_:)","abstract":"

    Layer delegate method called periodically by the layer. Should not be called manually.

    ","parent_name":"GIFImageView"},"Classes/GIFImageView.html":{"name":"GIFImageView","abstract":"

    Example class that conforms to GIFAnimatable. Uses default values for the animator frame buffer count and resize behavior. You can either use it directly in your code or use it as a blueprint for your own subclass.

    "},"Classes/Animator.html":{"name":"Animator","abstract":"

    Responsible for parsing GIF data and decoding the individual frames.

    "},"Classes.html":{"name":"Classes","abstract":"

    The following classes are available globally.

    "},"Protocols.html":{"name":"Protocols","abstract":"

    The following protocols are available globally.

    "}} \ No newline at end of file