Category: Swift Programming

Programming the iOS8 platform with Swift

Testing callback with delegate methods in Swift

Apple has now made it possible to test callback methods in unit tests for swift. It works great on callback methods directly, but also works if you have delegates reacting to the callback in another class The trick is to

Posted in Swift Programming

Be careful with Int and 32 and 64 bit architectures!

While I was doing a new App, I did all the development using Iphone 5s as the base model in the simulator, just testing it a few times om 6 and 6 plus. However, as I had submitted it to

Posted in Swift Programming

Flappy Birds Clone: Using SPRITEKIT for the first time ever

As a complete beginner in SpriteKit, I am amazed how easy it was to make a Flappy Bird clone (with some help from a course). flappybirds Quite fun too to play around with actually.  

Posted in Swift Programming

Using the UIAlertController in Swift (iOS8.1)

Swift (and objective C) comes with a handy way to handle login, confirmations, etc in alerts. Here is an example func handleParseLogin(){ let alertController = UIAlertController(title: “Login!”, message: “Please log in to the app”, preferredStyle: .Alert) let loginAction = UIAlertAction(title:

Posted in Swift Programming