Ask coding questions

← Back to all posts
Swift console typing animation
darkdarcool

So, I am new to swift, and I wanted a typing animation in the console for swift, and I tried to make one on my own, like this:

But for some reason the terminator didn't listen to the next line and wait the repeat. If I didn't use terminator, it worked great, but put each one one on a new line.

Can someone please help me make this work?

NOTE: I AM NOT USING XCODE

Answered by Coder100 [earned 5 cycles]
View Answer
Voters
darkdarcool
Comments
hotnewtop
Coder100

You forgot to flush the output. If you don't do that, swift won't print out the result like any other language.
https://repl.it/@Coder100/LividLopsidedMigration-aoeu-aeou-aoeu#main.swift

darkdarcool

@Coder100
Thanks! I’ll use this info later on!

Coder100

np :)
mark as correct answer or smth? @darkdarcool

darkdarcool

@Coder100
Both :)

Coder100

:) thanks @darkdarcool

darkdarcool
DynamicSquid

Flush the console