Get in touch! 01373 458503 | hello@futurformICT.co.uk

Swift Playground

Swift Playground

swift

With the release of iOS10 came a new iPad app called Swift Playground. This is Apple’s contribution to helping people, especially children, learn about how coding works. The nice thing about this kind of coding is that it is real. If you have a Mac you can download XCode and actually create apps, that you can add to the App Store (it does cost a yearly amount to have a developers Apple ID).

It introduces the logic of coding in a similar way to other coding apps, where you have to make the character move and complete tasks. You do this by selecting the correct pre-made Functions.  These are free addins, the first is the fundamentals of Swift and then there is another addin called Beyond the basics. Here is a look at the fundamentals:

The Fundamentals of Swift –

This starts you off with basic commands, you add in the functions to make the character move.

img_0396          img_0397         img_0398

 

It goes through the logic of using different functions to get the correct instructions. It also introduces Debugging, where it gives you a set of functions and you have to add and delete what is there to correctly move the sprite about.

img_0400

 

 

It then also introduces Functions. Functions are a way to put a set of instructions together so that they can be quickly added into the code without the need to repeat a lot of code. Swift Playground shows you the basics of how Functions are written.

 

img_0386     img_0389

It also introduces Loops. Showing how you can get code to go through the same set of instructions until it reaches the end.

img_0394

Another aspect it introduces is Conditional Code, that is specifying if a condition is true to something or do something else:

img_0403        img_0402        img_0404

The next subject introducted is Logical Operators. These follow the rule of AND OR and NOT. eg. If one condition AND another condition are true then do this, if this OR this are true to this, if this is NOT true run this code.

img_0406 img_0407 img_0409 img_0411

Next While Loops are introducted. This is code that keeps repeating until the condition is no longer true:

img_0412       img_0413        img_0414

Lastly in the Foundations of Swift algorithms are introduced.

img_0415     img_0417     img_0418     img_0419

It takes you through step by step instructions and then gives you a few tasks to demostrate. It is quick and simple, and you can go back over different areas a many times as you want. It is a good introduction to the Swift language for children and adults alike.

 

Share this post