How do you form shapes in Xcode? Swift Playgrounds book.

Swift Playgrounds Shapes has code I would like to use in Xcode, but it doesn't work. I have imported UIKit and SpriteKit.

How do you create a circle and set it in a scene? I'd also like to modify its isDraggable Boolean value, and add the event handlers: .touch and .touchUp

Thanks!

Unfortunately, many of the components used in the Shapes book are Swift Playgrounds only or the Shapes book only.

You can freely expand or modify the Shapes book and create a circle and set in a scene in the book as described in other parts of the book. But you need to do things in a different way in a UIKit app in Xcode.

You may need to find a good tutorial of SpriteKit.

How do you form shapes in Xcode? Swift Playgrounds book.
 
 
Q