Skip to content

kyleclegg/SwiftFlickrSearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SwiftFlickrSearch

This application is an example of searching the Flickr API for photos in Swift. Notably, it uses a UISearchDisplayController and the async callback pattern. See http://kyleclegg.com/blog/swift-flickr-search.

Search Screen Photo Screen

Getting Started

  • Clone the repo and run FlickrSearch.xcodeproj
  • No pod install or carthage update needed -- the only external library, SDWebImage, has been added to the project directly
  • Create a Flickr API key and replace placeholder with key in FlickrProvider.swift

The Flickr API

Images are retrieved by hitting the Flickr API.

{
    "farm": 8,
    "id": 15981410640,
    "isfamily": 0,
    "isfriend": 0,
    "ispublic": 1,
    "owner": "28339853@N03",
    "secret": "a0d5006167",
    "server": 7564,
    "title": "Chi shark week"
}

We use the farm, server, id, and secret to build the image path.

Other Notes

  • More details available at Swift Flickr Search
  • If you want to quickly test this out you are free to use this demo API key (0461b2b85aee5a025189ce3eed1aff6b), but I recommend replacing with your own API key from Flickr
  • Async pallback pattern in Swift credit goes to @szehnder

About

A simple Flickr Search application written in Swift

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published