vsay01 / WeSplit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WeSplit

  • Calculate how to split the check among number of people (It also include tips)
  • Enter cost of food; Select tip; Select how many people

What to learn

  • Basic UI design
  • Let user enter values + select from options
  • Track program state

Important note:

  • "views are a function of their state"
  • Struct is immutable
  • Property-wrapper @State, @FocusedState
  • Two-way binding (Read value from var and write it back to var)
  • id: .self
  • Component
    • Form
    • TextField
      • KeyboardType (DecimalPad/NumberPad)
      • Focused
    • Picker
      • PickerStyle (Segmented)
    • Text
    • Locale.current.currencyCode
      • Section
      • Header
    • NavigationTitle
    • ToolBar
      • ToolbarItemGroup
      • Spacer
    • Button

Screenshot

Screenshot after challenge

About


Languages

Language:Swift 100.0%