Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions DebuggingAndProfiling/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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.



*/
4 changes: 3 additions & 1 deletion DebuggingAndProfiling/DebugThisCode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -68,3 +68,5 @@ struct DebugThisCode_Previews: PreviewProvider {
DebugThisCode()
}
}