Drop in GIF Collection View. Uses Tenor as default GIFs provider.

Overview

GifCollectionView

CocoaPods

Drop in GIF Collection View. Uses Tenor as default GIFs provider. This will allow you to easily integrate GIF image search into your app or you can use this as a GIF keyboard for your messaging needs.

You can also implement your own GifProvider with another GIF service (e.g: GIPHY) and supply the provider to GifCollectionView.

Demo

Requirements

  • iOS 12.0+ | macOS 10.15+
  • Xcode 13

Integration

CocoaPods (iOS 12.0+, OS X 10.15+)

You can use CocoaPods to install GifCollectionView by adding it to your Podfile:

platform :ios, '12.0'
use_frameworks!

target 'MyApp' do
    pod 'GifCollectionView'
end

Usage

Initialization

import GifCollectionView

Simply initialize GifCollectionView like any other view and provide appropriate constraints.

gifCollectionView = GifCollectionView.init()
gifCollectionView.delegate = self
view.addSubview(gifCollectionView)

In order to load Gifs using Tenor you must supply your own Tenor API Key.

gifCollectionView.setTenorApiKey(apiKey: "YOUR_TENOR_API_KEY")
gifCollectionView.startLoadingGifs()

Or you can supply your own Gifs provider by conforming to GifProvider protocol

gifCollectionView.replaceProvider(<#T##provider: GifProvider##GifProvider#>)
gifCollectionView.startLoadingGifs()

You can receive callbacks for selected images using GifCollectionViewDelegate.

public protocol GifCollectionViewDelegate: AnyObject {
    func didSelectGifItem(gifItem: GifItem)
    func scrollViewDidScroll(_ scrollView: UIScrollView)
}

Questions

If you have questions on how to integrate GifCollectionView into your project, feel free to create an issue and we'll try to help the best we can. Pull Requests and bug fixes are wellcome.

Apps using GifCollectionView

If you have an app using GifCollectionView, let me know and I'll link to it here.

You might also like...
A tool support convert image gif to gif3d
A tool support convert image gif to gif3d

Trick convert gif to gif3d using Swift Features Simple way to convert gif to gif3d Change background Change size eraser tool How to work Add a layer w

Inspired by HBO's Silicon Valley: SeeFood is an iOS app that uses CoreML to detect various dishes
Inspired by HBO's Silicon Valley: SeeFood is an iOS app that uses CoreML to detect various dishes

SeeFood For a step by step guide on how to build SeeFood: How to train your own model for CoreML. . Video Demo Follw me on Twitter Prerequisites: Xcod

An app that uses Multipeer Connectivity to play a video across 6 different iOS screens with an additional phone acting as a Main/Control phone.
An app that uses Multipeer Connectivity to play a video across 6 different iOS screens with an additional phone acting as a Main/Control phone.

MultiScreenApp An app that uses Multipeer Connectivity to play a video across 6 different iOS screens with an additional phone acting as a Main/Contro

Flutter openvpn - A new Flutter plugin that uses OpenVpn

flutter_openvpn A new Flutter plugin that uses OpenVpn. Installation Depend on i

FlickrSearchPhotos - Simple search photos application which uses Flickr REST API made in Swift
FlickrSearchPhotos - Simple search photos application which uses Flickr REST API made in Swift

FlickrSearchPhotos - Simple search photos application which uses Flickr REST API made in Swift

DTPhotoViewerController - A fully customizable photo viewer ViewController to display single photo or collection of photos, inspired by Facebook photo viewer.
DTPhotoViewerController - A fully customizable photo viewer ViewController to display single photo or collection of photos, inspired by Facebook photo viewer.

DTPhotoViewerController Example Demo video: https://youtu.be/aTLx4M4zsKk DTPhotoViewerController is very simple to use, if you want to display only on

Collection of SwiftUI shapes
Collection of SwiftUI shapes

SwiftUI Shapes Collection of custom shapes Regular Polygons RegularPolygon(sides: 32) RoundedRegularPolygon(sides: 6, radius: 20) Lines and Curves Qua

The collection of image filters with swift
The collection of image filters with swift

SemanticImage The collection of image filters. How to use Setting Up 1, Add Sema

A custom ImageView that is used to cover the surface of other view like a scratch card, user can swipe the mulch to see the view below.
A custom ImageView that is used to cover the surface of other view like a scratch card, user can swipe the mulch to see the view below.

MCScratchImageView GIF Showcase Requirments iOS 8.0+ Xcode 7.2+ Swift 4.0 Installation CocoaPods pod "MCScratchImageView" Manually Just drag MCScratch

Owner
null
Avatar provider for iOS tweak Contacy.

ContacyAvatarProvider Usage copy iphone_Contacy_avatar_provider.nic.tar to $THEOS/templates/ios/iphone/ $THEOS/bin/nic.pl and choose Contacy_avatar_pr

KpwnZ 6 Dec 16, 2022
Kanvas is an open-source iOS library for adding effects, drawings, text, stickers, and making GIFs from existing media or the camera.

Kanvas Kanvas is an open-source iOS library for adding effects, drawings, text, stickers, and making GIFs from existing media or the camera.

Tumblr 267 Nov 24, 2022
Gifu adds protocol-based, performance-aware animated GIF support to UIKit.

Gifu adds protocol-based, performance-aware animated GIF support to UIKit. (It's also a prefecture in Japan). Install Swift Package Manager Add the fo

Reda Lemeden 2.8k Jan 7, 2023
A Swift implementation of fastimage. Supports PNG, GIF, and JPEG.

ImageScout ImageScout is a Swift implementation of fastimage. It allows you to find the size and type of a remote image by downloading as little as po

Reda Lemeden 967 Dec 30, 2022
SwiftGif - A small UIImage extension with gif support.

SwiftGif - A small UIImage extension with gif support.

SwiftGif 1.3k Dec 20, 2022
High performance GIF engine

SwiftyGif High performance & easy to use Gif engine Features UIImage and UIImageView extension based Remote GIFs with customizable loader Great CPU/Me

Alexis Creuzot 1.7k Jan 3, 2023
High-performance animated GIF support for iOS in Swift

Gifu adds protocol-based, performance-aware animated GIF support to UIKit. (It's also a prefecture in Japan). Install Swift Package Manager Add the fo

Reda Lemeden 2.6k Jun 21, 2021
XAnimatedImage is a performant animated GIF engine for iOS written in Swift based on FLAnimatedImage

XAnimatedImage is a performant animated GIF engine for iOS written in Swift based on FLAnimatedImage. An illustration is shown below: Features Plays m

Khaled Taha 561 Sep 9, 2022
DGImageView - Asynchronous image downloader with cache. Supports gif too

DGImageView Installation Usage DGImageView Asynchronous image downloader with cache. Supports gif, memory cache, disk cache features. Installation Xco

donggyu 1 Jan 1, 2022
An app show your Live Photo and export as GIF.

LivelyGIFs Show your Live Photo and export as GIF. Demo HighLights Do not use Pod or Cathage to install 3rd party library Simple logic, new learner fr

Xue Yu 95 Jun 24, 2022