Skip to content

brightdigit/peopart

Repository files navigation

peopart

Sample iOS and watchOS application

Resulting Application Demonstration

Step 1 - Setup UI Navigation Structure

To begin working on this step:

git checkout master

Concepts

Tasks

  • Create a class for listing users by subclassing UITableViewController

    • Hints
      • create a new Cocoa Touch Class subclass of UITableViewController called UsersTableViewController
  • Display a single tab for listing users (no items needed yet)

    • Hints * in application(_:willFinishLaunchingWithOptions:)... create a UIWindow with the size of the main UIScreen
      • ... create a UINavigationController with a rootViewController of UsersTableViewController
      • ... create a UITabBarController with our new UINavigationController
      • ... set the rootViewController of the new UIWindow to our new UITabBarController
      • ... make the new UIWindow key and visible
      • ... set the window property to the newly created UIWindow
      • ... return true

Optional

  • Use extensions to refactor the way our view controllers are displayed

What the end of step 1 should look like

Step 2 - Parse and Display Data

To skip ahead and begin working on this step:

git checkout feature/step-1

Concepts

Tasks

  • Use JSONDecoder to parse the bundled JSON using Codable into a set of structs
    • Hints
      • Get the url of the JSON file resource from the main Bundle
      • Get the binary Data object from the url
      • Make User implement both the UserProtocol as well as the Codable protocol
      • Use the JSONDecoder to decode the binary data into a container object with a User Array
  • Create and register a custom UITableViewCell and understand how to use IBOutlet
    • Hints
      • Create a custom UITableViewCell Cocoa Touch class
      • Use Xcode to define a series of @IBOutlet properties which connent with UI element in the xib
  • Display the list of users from the JSON file into the UsersTableViewController
    • Hints
      • register our custom UITableViewCell Cocoa Touch class
      • call the method to retrieve users from the database and reload the tableView
      • implement both tableView(_:numberOfRowsInSection:) and tableView(_:cellForRowAt:)
      • in tableView(_:cellForRowAt:) dequeue our custom tableView cell
      • set each property in our custom UITableViewCell
  • Understand the basics of updating the user interface and the main thread
    • Hints
      • All UI changes need to be on the main thread

What the end of step 2 should look like

Step 3 - Display More Complex Data

To skip ahead and begin working on this step:

git checkout feature/step-2

Concepts

  • Being able to decode dates from JSON - JSONDecoder.dateDecodingStrategy
  • Allow for greater flexability using Protocol-Oriented Programming
  • Create more complex return types using Functional Programming (map, reduce, sorting, max, etc...)
  • Application Transport Security
    <key>NSAppTransportSecurity</key>
    <dict>
    <key>NSExceptionDomains</key>
    <dict>
    <key>lorempixel.com</key>
    <dict>
    <key>NSExceptionAllowsInsecureHTTPLoads</key>
    <true/>
    <key>NSIncludesSubdomains</key>
    <true/>
    </dict>
    </dict>
    </dict>

Tasks

  • Setup Posts and Comments
  • Dealing with Dates and Codable
  • Basic Functional Programming
  • Setup Application Transport Security

Step 4 - Apple Watch App Setup

git checkout feature/step-3

Tasks

About

Sample iOS and watchOS application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages