Archives for 

swift 2.0

SpriteKit Game From Scratch, Swift 2.0, part 4

    Introduction Hi and thanks for following this tutorials so far! This would be the fourth and final part. So far, if you have followed the previous 3 parts you should have a working simple game. The current project files are located here: SpriteKit tutorial part 3 files In this part we’ll look into adding […]
1

SpriteKit Game From Scratch, Swift 2.0, part 3

    Introduction Before I go on with this tutorial I just want to say a few words. The tutorial is getting quite long and for a few good reasons – I am trying not to leave a lot out and I am writing in in a raw format, meaning I am not refining it, […]
0

SpriteKit Game From Scratch, Swift 2.0, part 2

    Introduction   We’ll continue with our tutorial on creating a SpriteKit Game from scratch. Last we took off where we were able to create an instance of our hero on every tap on the screen. However we won’t really be creating our hero or the enemy with a tap on the screen, we […]
8

SpriteKit Game From Scratch, Swift 2.0, part 1

    Introduction As I foresee this to get a little longer I might have to split this up in two or more parts. There are already some tutorials out there, but I have found that most of all are missing some vital things. They might be useful as a place to start and by […]
9

Saving and Loading Text in Swift

    Here is a full solution on saving and loading text with Swift 2.0, current example is for saving and loading high score in a game. Using those 2 functions we can now declare a variable to store a path to our highscore text file: Here is how we would load  text […]
6

Get file in local Directory

If you have been using the old way of Swift 1.2 to locate files in your local directory and documents folder, you can forget about that in Swift 2.0 in the latest Apple update of iOS 9.1 and Xcode 7.1. Before you would use something like: After I had to do some headbanging I […]
2

Saving and Loading Images, Swift 2.0

This will show you how to save and load images in a way that is very easy and straight forward. Here is the function to save your image first. We’ll assume you already have an UIImageView, containing an image, named ‘image’ : Here is how to use the function later in your code: […]
34