Giter Club home page Giter Club logo

swiftui-firstapp's Introduction

Reengineering of the WWDC demo app shown at session "Introducing SwiftUI: Building Your First App"

During session 204 "Introducing SwiftUI: Building Your First App", an App has been presented to illustrate the power of SwiftUI. Sadly the code was not published and as the APIs in SwiftUI have evolved since the early seeds in July 2019, parts of the application have to be adapted to be comilable on todays Xcode 11.2.

As I haven't found the example code somewhere to download, and it seems as if nobody really documented the necessary adaptions to make the demo application run on todays systems, I've been working on this, in the hope other SwiftUI developers can benefit of it.

In contrast to what is shown @WWDC 2019, the following adaptions have to be made:

  • ContentView.swift

    • .listStyle(.grouped) does not exist and has to be written as .listStyle(GroupedListStyle())
    • NavigationButton (used to push the detail view) has been renamed to NavigationLink
    • ObjectBinding has been replaced by ObservedObject
  • RoomStore.swift

    • BindableObject is now ObservableObject
    • didChange / didSet or willChange / willSet along with the PassthroughSubject is not necessary to notify SwiftUI/Combine. The corresponding property can be marked with @Published and the notifyer will get generated.
  • RoomDetail.swift

    • tapAction (to zoom the image in the RoomDetail view), has been renamed to onTapGesture
    • Custom animation duration with withAnimation .basic does not exist, .linear or .easeInOut can be used as replacement.
  • Localizable.string*:

    • as I do not have an Arabic translator at hand, I've simply enabled german translations.
    • Please be aware that the plural localisations (%lld people in Localizable.stringsdict) are currently not used/functional in the SwiftUI preview within Xcode. You will have to run the application in the simulator to see the proper translations.

swiftui-firstapp's People

Contributors

pd95 avatar

Watchers

James Cloos 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.