Module Outline

Use the following resources and work with your mentor to master the objectives for this module. Practice by completing the Mini-Project, Project, and Challenges.

Video Challenges

  • Sort the Array

    Using the Playground used in the Group Demo for this objective, sort the array of people by age in ascending order.

    Map an array of ages and sort that array in descending order.

  • App Icon
    • Create an URLSessionDownloadTask to get poster art
    • Display the album art on the View Controller

Stretch Problem

    Making Change

    Make a function that takes in a given amount of money i.e. 2.15 and returns a string of the amount of dollars, quarters, dimes, nickels, and pennies needed to make that amount of money. Return something like : Your change is 1 quarter, 2 dimes, 0 nickels, and 1 penny

    ♦ Black Diamond

    Make a function that takes in the cost of an item, and the amount of money paid (i.e. the cost is $2.15 and the amount of money paid is $5.00) and then returns a string detailing the amount of change in dollars, quarters, dimes, nickels, and pennies.

    When this works, try to recreate Swift's built-in filter function. Just like the Swift function, it should be generic and it should take a closure that returns a Bool, from which it determines how to filter your sequence type.

  • Hint
  • Solution

Guided Project

    Pokedex

    Pokedex lets students further practice using closure syntax, read API documentation, and make network calls using URLSession.

Project

  • SubredditCodable

    Students will build an app to get the posts in a user-requested subreddit to practice asyncronous network requests, working with JSON data, Codable, closures, and intermediate table views.

    ReadMe

Mastery Review

Module 19 - Intermediate Rest APIs - Intermediate Codable
  • Expand all
  • Collapse all
  • Making Change stretch problem
  • Challenges
    • Sort the Array objective challenge
    • App Icon objective challenge
  • Pokedex guided project