diff --git a/DebuggingAndProfiling/ContentView.swift b/DebuggingAndProfiling/ContentView.swift index f931a6d..d1f01db 100644 --- a/DebuggingAndProfiling/ContentView.swift +++ b/DebuggingAndProfiling/ContentView.swift @@ -35,3 +35,12 @@ struct ContentView_Previews: PreviewProvider { ContentView() } } +/* 1. after debugging the code I did not find any major issue. I think the program is working fine. I was confising how to analyse the information. + + 2. After using the profile, i saw the number of screen refreshes is zero. when I switched to the stress test, it went to fully agreed. + + 3. In the time profiler, I can see how many time the numbers changed. + + + + */ diff --git a/DebuggingAndProfiling/DebugThisCode.swift b/DebuggingAndProfiling/DebugThisCode.swift index 647fc57..e313ae6 100644 --- a/DebuggingAndProfiling/DebugThisCode.swift +++ b/DebuggingAndProfiling/DebugThisCode.swift @@ -42,7 +42,7 @@ struct DebugThisCode: View { TextField("Temperature in Celsius", text: $celsiusTemp) Button(action: { if let cel = Double(celsiusTemp) { - var fah = (cel * 5 / 9 ) + 32 + let fah = (cel * 5 / 9 ) + 32 fahrenheitTemp = String(fah) } else { print("Not a valid number") @@ -68,3 +68,5 @@ struct DebugThisCode_Previews: PreviewProvider { DebugThisCode() } } + +