Category: Swift
-
Resizable UIWindow on iOS
I came across a Todo item in my inbox (I often email myself things todo) whilst tidying it up following Christmas, entitled “Make a resizable UIWindow”. I can remember sending this to myself but not what I was reading or watching that prompted me to do…
-
Resizable UIWindow on iOS
I came across a Todo item in my inbox (I often email myself things todo) whilst tidying it up following Christmas, entitled “Make a resizable UIWindow”. I can remember sending this to myself but not what I was reading or watching that prompted me to do…
-
A slight enhancement on Developing tvOS Apps with Swift
Apple announced tvOS yesterday. Downloading Xcode 7.1 Beta comes with the SDK and simulator for tvOS apps. The official documentation starts to run through how to create a basic app but is doesn’t mention where to place and load the JS from and the sam…
-
A slight enhancement on Developing tvOS Apps with Swift
Apple announced tvOS yesterday. Downloading Xcode 7.1 Beta comes with the SDK and simulator for tvOS apps. The official documentation starts to run through how to create a basic app but is doesn’t mention where to place and load the JS from and the sam…
-
Drawing into bitmaps and saving as a PNG in Swift on OS X
Not an in depth post today. For a small iOS Swift/SpriteKit game I’m writing for fun I wanted a very basic grass sprite that could be scrolled; to create a parallax effect. This amounts to a 800×400 bitmap which contains sequential isosceles triangles …
-
Drawing into bitmaps and saving as a PNG in Swift on OS X
Not an in depth post today. For a small iOS Swift/SpriteKit game I’m writing for fun I wanted a very basic grass sprite that could be scrolled; to create a parallax effect. This amounts to a 800×400 bitmap which contains sequential isosceles triangles …
-
Resolving strong references between Swift and Objective-C classes – Using unowned and weak references from Swift to Objective-C classes
My Swift and SpriteKit exploration continues. At the moment I’m writing the collision handling code. Rather than derive game objects from SKSpriteNode with each derived class containing the code for handling collisions with the other types of game obj…
-
Resolving strong references between Swift and Objective-C classes – Using unowned and weak references from Swift to Objective-C classes
My Swift and SpriteKit exploration continues. At the moment I’m writing the collision handling code. Rather than derive game objects from SKSpriteNode with each derived class containing the code for handling collisions with the other types of game obj…
-
Beware: Despite the docs SKNode userData is optional
In the Swift documentation for SKNode the userData member (a dictionary) is defined as follows: userData A dictionary containing arbitrary data. Declaration SWIFT var userData: NSMutableDictionary! OBJECTIVE-C @property(nonatomic, reta…
-
Beware: Despite the docs SKNode userData is optional
In the Swift documentation for SKNode the userData member (a dictionary) is defined as follows: userData A dictionary containing arbitrary data. Declaration SWIFT var userData: NSMutableDictionary! OBJECTIVE-C @property(nonatomic, reta…