Priya Talreja avatar

Chapter 5 - Swift Playgrounds

priyatalreja

Published: 22 May 2018 › Updated: 22 May 2018Chapter 5 - Swift Playgrounds

Chapter 5 - Swift Playgrounds

  • Swift Playgrounds helps you learn and explore coding in Swift.
  • Swift Playgrounds can satisfy your curiosity about what coding is and how it works, but it doesn’t really let you write apps.
  • In Swift Playgrounds you create small programs called “playgrounds” that instantly show the results of the code that you write.
  • Playgrounds are a great way to try some code and see the results immediately.
  • Steps to create a Swift Playground
    1 - Launch Xcode
    2 - Click on Getting Started with a playground.
    Xcode Priya Talreja
    3 - You’ll see a list of playground templates you can choose from, but for now we’re going to choose Blank.
    SwiftPlayground Priya Talreja
    4 - Finally, Xcode will ask you to name your playground – the default name is "MyPlayground", you can give whatever name you want.
    SwiftPlayground Priya Talreja Swift Tutorials
    5 - Click Create.

After playground is created, you'll see is a window split in two.

  • Left panel is for the code.
  • Right panel is for results.

SwiftPlayground Priya Talreja Swift Tutorials

On the right, once Xcode has built and run the code, you'll see this: "Hello, playground".

My next blog will be on Variables and Constants.

Priya Talreja Xcode Tutorials
Please let me know if you have any doubts or queries in the comment section below.
Follow me priyatalreja@priyatalreja to get the latest feeds of iOS App step by step development tutorials.
Thanks.

Leave Chapter 5 - Swift Playgrounds to:

Written by

Developer

Read more #swift-tutorials posts


Best Posts From Priya Talreja

We have not curated any of priyatalreja's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Priya Talreja