-3

From here I'm trying to grab speed data from the class, but I cannot figure how.

Let's say I have a class SpeedTest; in MyViewController I instantiate:

let mySpeedTest = SpeedTest()

starting test

mySpeedTest.startSpeedTest(usedVC: self)

now, how do I grab the result in my MyViewController?

marc_s
  • 704,970
  • 168
  • 1,303
  • 1,425
biggreentree
  • 1,493
  • 3
  • 17
  • 34

1 Answers1

-1

You need

mySpeedTest.checkForSpeedTest()

mySpeedTest.speedTestCompletionBlock =  { [weak self] (megabytesPerSecond ,error)  in

    print(megabytesPerSecond)
}
Sh_Khan
  • 93,445
  • 7
  • 57
  • 76