Code Monkey home page Code Monkey logo

swiftui-demo's Introduction

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

swiftui-demo's People

Contributors

bradfora avatar meganedev avatar stonehouse avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.