I have an external console application (on OS X) that emits a sequence of integers from 1 to 100 to standard output, roughly once every second.
I Swift, I need to use th
You are reading synchronously on the main thread, therefore the UI is not updated until the function returns to the main loop.
There are (at least) two possible approaches to solve the problem: