User Tools

Site Tools


swift

**This is an old revision of the document!**

Swift

Tutorial for beginners: https://developer.apple.com/tutorials/app-dev-training

  • Important concept: pass object between views.
  • struct ScrumsView_Previews: PreviewProvider is just for showing an mock up preview when you coding. It is not a part of the real app.
  • Add @State at the beginning to declear a single source of truth at the very most parent view. Use $[variable name] to pass it to child view. In child view initialize with @Binding var [variable name]: [variable type] to use that data.
  • The annotation environmentObject(_:) means …
swift.1659886459.txt.gz · Last modified: 2022/08/07 23:34 by admin