SwiftUI: Split The Check App

This is a very short sample of an app that allows calculating how much every person should pay based on the check, the tip, and the number of people. Credits: This app is based on the course “100 Days of SwiftUI” by @twostraws. Code Sample import SwiftUI struct ContentView: View { @State private var checkAmount = 0.0 @State private var peopleQuantityIndex = 0 @State private var tipPercentage = 18 @FocusState private var shouldShowKeyboard: Bool static let currencyCode = Locale....

May 28, 2024 · 1 min