Skip to content

v1.2.8

Compare
Choose a tag to compare
@cgmaier cgmaier released this 11 May 16:19
079cfeb
  • Blur theme design improvements

  • Refactor which makes GPHTheme (previously an enum) into an object type.

GPHThemeType, is now an enum which represents the default template theme cases (.light, .dark, .lightBlur, .darkBlur)

Set the theme on your GiphyGridController or GiphyViewController like so

giphyViewController.theme = GPHTheme(type: .lightBlur) 

You can also now create your own GPHTheme subclass and override various properties, including fonts and colors.

  • Documentation updates, including table of contents

  • Includes the cell as a parameter to the didSelectMedia method of the GPHGridDelegate protocol, for use with the GiphyGridController

This is to support the use case where it makes sense to briefly display a “copied” message on top of the cell for the GIF selected by the user in a keyboard extension context. It may make sense to temporarily disable user interaction of the grid for the duration of the animation.

extension ViewController: GPHGridDelegate {
    func contentDidUpdate(resultCount: Int) {
        print("content did update")
    }
    
    func didSelectMedia(media: GPHMedia, cell: UICollectionViewCell) {
        print("did select media")
    } 
}