Skip to content

bharathCTreehouse/WeSplit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My first look at SwiftUI.

This is a simple app that calculates the amount an individual owes, given the bill amount, tip percentage and the number of people.

Used the following UI components:

  1. Form
  2. TextField
  3. Picker
  4. Button
  5. Alert

Got exposed to Modifiers, Property wrappers and other SwiftUI essentials. Used @State, @FocusState wrappers and experimented with them. @FocusState is used to toggle the placement of focus on a particular view. (Similar to firstResponder in UIKit by the looks of it). In this app, we used it to toggle the display of the keypad.

The $ symbol is used as a binding agent. It signifies that values can be read from and written into. Any change to properties marked with @State triggers the 'body' computed property and re-renders the UI.

Learning source: Hacking With Swift.

Releases

No releases published

Packages

No packages published

Languages