It’s been an amazing month since Apple announced Swift, at WWDC 2014. Since then we saw a lot of enthusiasm among developers all over the world, writing hundreds of blog posts and discussing on Reddit and Twitter. A bit over 100.000 people visited We ❤ Swift. We are really excited to see the massive number of people interested in learning Swift in just one…
Monthly Archives: June 2014
How to make a custom keyboard in iOS 8 using Swift
tl;dr I will go over the basics of a Keyboard Extension and then make a morse code keyboard using the new Application Extension API in iOS 8. It should take you about 20 minutes to go through all the steps. full code Overview A custom keyboard replaces the system keyboard for users who want capabilities such as a novel text input…
Object Subscripting in Swift
What is Object Subscripting Subscripts are shortcuts for accessing elements from a collection, sequence or list. They are used to set and retrieve values by index without needing separate methods for setting and retrieval. A type can have multiple subscripts and subscripts can have more than one dimension. To access elements via subscripts write one or more values between square…
Swift Classes – Part 2
Inheritance A class can inherit methods, properties, and other characteristics from another class. When one class inherits from another, the inheriting class is known as a subclass, and the class it inherits from is known as its superclass. Inheritance is a fundamental behavior that differentiates classes from other types in Swift. A simple example of inheritance: class AClass { func doSomething() {…

Fractals in Xcode 6
tl;dr You can edit shaders in Xcode 6 with live preview. This can be used to render Fractals. It should take you 10-20 minutes to go through all the steps in this tutorial. Full Code Xcode 6 added a powerfull new editor for SpriteKit scenes that let’s you visually design scenes for your games. You can expect tutorials on programming games with SpriteKit…
How to make awesome UI components in iOS 8 using Swift and XCode 6
In Xcode 6 two new interface builder declaration attributes were introduced: IBInspectable and IBDesignable. IBInspectableexposes class properties in the interface builder Attribute Inspector, and IBDesignable updates the view in realtime! They are pure magic! I can’t wait to see what cool stuff you will make. tl;dr a short tutorial on how to use IBInspectable and IBDesignable with a video demo. It should take you around 10 minutes to go through all the steps. code on…
Swifting Around
tl;dr I’m going to make a simple tableview with a custom cell type, use the new UIVisualEffectView from iOS 8 and then show off a bit of the power of Swift. It should take you about ~30 minutes to go through all the steps. Enjoy! full code if you are looking for a simpler tutorial for tableviews check out this one Create a new project Open Xcode 6, create…
Bookmark We❤Swift
Open the homepage of We❤Swift on your iOS device Tap the share button Select “Add to Home Screen” Enjoy We❤Swift on your favorite device(s)
Swift Classes – Part 1
Creating a class To create a new class use the class keyword followed by the class name and a pair of braces. Inside the braces we can declare the class properties. class Point { var x = 0.0 // sets the default value of x to 0 var y = 0.0 // sets the default value of x to 0 } //…
Higher Order Functions: Map, Filter, Reduce and more
Introducing Closures One of the great features of Swift is a clean new syntax for first class functions / closures that replaced the quite confusing block syntax. So hopefully we won’t need something like fuckingblocksyntax for Swift. Closures are self-contained blocks of functionality that can be passed around and used in your code. In this article we’ll focus on closures that are…