Skip to content

stonehouse/SwiftUI-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SwiftUI Demo App 🥳

This is a demo app built using SwiftUI that works with the Public Transport Victoria (PTV) API. This is a demo both of building UI in SwiftUI as well as managing data flow with Combine. This repo is intended to serve as a playground for trying out SwiftUI.

Getting Started

This repo contains an Xcode project with some basic SwiftUI views that show PTV services, routes, stops and departure times, and yes, this is real data! Feel free to fork this repo, or download the zip to get started!

Ideas

Not sure what you want to get started with? Here are some possible things you could look into:

SwiftUI Views
Model
  • Add the ability to favourite different routes or stops
  • Improve the Search class to use complex Combine operators, i.e. throttle user input every 300 milliseconds
  • Build a Core Data model which drives the views, and update the model when PTV content loads (see How to configure Core Data to work with SwiftUI)
Watch App

WatchOS also supports SwiftUI, which could give you a lot more flexibility than the existing WatchKit API. See Building watchOS App Interfaces with SwiftUI

Notes

  • To switch to fixture data, just change the ptv constant to .fixtures in PTV.swift
  • To run the app on your device, open the project settings, go to "Signing & Capabilities", and in the "Team" drop down, select a valid team. If you are having trouble with this feel free to ask any of the hosts to help you out.

Resources

SwiftUI

Hacking with Swift - Get Started

Apple's SwiftUI Tutorials

Ray Wenderlich Screencats

WWDC 2019 Videos

Design

SF Symbols

Combine

Receiving and Handling Events with Combine

SwiftUI Notes (Combine)

PTV

PTV API Documentation

Take Home Resources

Hacking with Swift - 100 Days of SwiftUI

SwiftUI by Tutorials - Ray Wenderlich

Combine: Asynchronous Programming with Swift - Ray Wenderlich

About

Demo app using SwiftUI that works with Combine.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages