Skip to content
 
 

Repository files navigation

Snippets for Swift

What can you do with the Snippets framework?

See the classes themselves for full details. The following sections provide some usage examples.

[Work in Progress]

Create Random User

Generate a random user: lorem ipsum, but for people.

import Snippets

    // Initialise a random-user connection.
    let randomUser = RandomUser()

    // Generate random user information.
    randomUser.get { (randomUser) in
      let results = randomUser["results"] as? [NSDictionary]
      let nat = results?.first?["nat"] as? String
      let info = randomUser["info"] as? NSDictionary
      let seed = info?["seed"] as? String
      let version = info?["version"] as? String
      
      // Do something with the random-user information.
    }

Change Log

See up-to-date change log here.

About

A collection of Swift snippets for enhancing standard Apple frameworks

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages