Author: larsoleruben

There are some great tutorials from Ayaka Nonaka in this blog. Well worth checking it out. Especially the part about optionals and enums.

Do you think the standard¬†UIActivityIndicatorView is a bit boring (has only gray an white) and that the size is too small? Despair no more. Here is a great tutorial and it is just a few lines of code and you …

Great tutorial for iOS animations Read More »

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 …

Testing callback with delegate methods in Swift Read More »

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 …

Be careful with Int and 32 and 64 bit architectures! Read More »

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.  

Some hints and links   1) Handling substrings See this excellent website about using the strange new¬†string.substringwithrange( range: Range<String.Index>) and the String.substringFromIndex( index: String.index) let myString = “[ABCDEFGHI]” let startIndex = advance(myString.startIndex, 1) let endIndex = advance(myString.endIndex, -1) //start- and …

Handling strings in Swift is STRANGE! Read More »

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: …

Using the UIAlertController in Swift (iOS8.1) Read More »