Question: Use Grand Central Dispatch to modify the following method definition so that reallyLongCalculation() will be performed in a background thread: func buttonPressed() { var result:
Use Grand Central Dispatch to modify the following method definition so that reallyLongCalculation() will be performed in a background thread:
func buttonPressed() {
var result: Int
result = reallyLongCalculation()
resultTextField.text = "(result)"
}
Step by Step Solution
3.47 Rating (160 Votes )
There are 3 Steps involved in it
You can use Grand Central Dispatch GCD in Swift to perform reallyLongCalculation in a background thr... View full answer
Get step-by-step solutions from verified subject matter experts
