From 32388dd4441ce04c747706094b11d92e15803910 Mon Sep 17 00:00:00 2001 From: Ryan Arana Date: Wed, 16 Oct 2019 09:02:41 -0700 Subject: [PATCH] Day 23 Challenge 2: Make tip and total red when tip == 0 --- WeSplit/WeSplit/ContentView.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WeSplit/WeSplit/ContentView.swift b/WeSplit/WeSplit/ContentView.swift index 0f8dff2..04e7ad2 100644 --- a/WeSplit/WeSplit/ContentView.swift +++ b/WeSplit/WeSplit/ContentView.swift @@ -57,11 +57,14 @@ struct ContentView: View { Text("+ Tip") Spacer() Text("$\(tipAmount, specifier: "%.2f")") + .foregroundColor(tipPercentage == 0 ? .red : nil) } HStack { Text("Total") Spacer() Text("$\(total, specifier: "%.2f")") + .foregroundColor(tipPercentage == 0 ? .red : nil) + .bold() } }