please re-post your code inside a code block (use the formatting tools at the bottom of the text entry field). It is too difficult for anyone to read it formatted this way.
Also, tag your post with the platform you are developing for (macOS, iOS, watchOS, iPadOS, tvOS)
Topic:
Programming Languages
SubTopic:
Swift
Tags: