The Swift Playgrounds app really hasn’t gotten any love[1] since it was first introduced. You can actually import UIKit and the other frameworks and compile them on the iPad but this is pretty much undocumentated. The preview views are tremendously buggy (really the whole app is) and there is all sorts of hidden debug stuff running in the background[2] that slows down performance. Everything has to be in a single file so doing anything moderately complicated is a pain, the editor is buggy and will sometimes highlight just the last three letters of a word, and there is no Interface Builder[3]. I would love a real XCode.
[1]There have been new playgrounds added (e.g. “Learn to Code with Swift”) but the app itself really hasn’t been changed at all. The same bugs have been present for years. And they aren’t obscur either. You will run into editor bugs within the first 5 minutes.
[2] The debug stuff is to help facilitate the different playgrounds, but doesn’t really provide any benefit to someone coding in a blank file outside of a playground. You can’t turn it off within the app.
[3] I know a lot of people don’t like IB, but it’s great for throwing together simple apps quickly. It’s odd that it is absent from the official apple App but Pythonista, an app made by one person, has an visual interface editor.