As I said in the last post, I’m going to share with you my story of learning and discovering the Playground framework. This is the first post in this series, and there will be few first thoughts about Playground.
This is my first time, I’ve created a Playground project, and of course, I’ve selected Game template to see what Apple prepared for us.
The project looks like this.
The screen with the text: Hello, World! and actions on click, and move (These blue squares with rounded corners). It looks OK.
I’ve spent a few hours looking for how to create something and some playing with code.
As always, I create a Tic Tac Toa game, because I think it’s very easy to create and allows to learn some basic.
Results after that time:
For now, there is only board and each field adds emoji on clicked filed.
In the next weeks, I’ll develop it with more features.
First thoughts about Playground:
1. You can only reload the project when something has been changed.
When this button is grey, then you can’t rebuild the project. Adding empty space helps here.
2. View to display as PlaygroundPage.current.liveView can be everything. It can be UIView, it can be UIViewController or as in sample project SKView. I think it’s very helpful because at the beginning I thought that there can be only SKView.
3. Lack of resources. When you put Swift into Google, there are hundreds of pages with many tutorials, tips, and trick, StackOverFlow is full of questions. When I was looking for some tutorials there aren’t many pages with that kind of knowledge. This is quite valuable post – freeCodeCamp.org
4. Markdown in comments. There is an option to write comments using Markdown. It looks very interesting and I’m sure there will be a post about it in the future.