DISCLAIMER This tutorial is intended for people who are just starting out with iOS programming. It doesn’t assume any familiarity with Xcode and only assumes basic knowledge of Swift programming and OOP. In this tutorial you’re going to make a tip calculator iOS application. First Steps To follow along with this tutorial you’ll need to have Xcode installed. Xcode is…
Author Archive for Silviu Pop

Random Names using Markov Chains
Introduction In this tutorial we’ll look at generating plausible random names from a list of pre-existing names. We’ll also build a fun little app that lets you generate your Elf / Ninja name. Just generating random characters won’t give us reasonable results. We’ll use a list of preexisting names in order to generate new ones. We’ll take advantage of the…

Binary Search and Applications
In this tutorial we’ll look at one of the fundamental algorithms of computer science, binary search. We’ll also look at a practical application of binary search: implementing fast autocompletion. Introduction Consider the problem of finding an item in an array. The obvious solution is to go through all the items in the array and check if any of them is…

Bezier Paths and Gesture Recognizers
In this tutorial we’ll be creating an app that lets you play around with shapes, moving, scaling and rotating them. We’ll be UIGestureRecognizers and UIBezierPaths. The end result will look like this: Detecting Taps To get started, create a new Single View Application. Make sure to select Swift as the programming language andUniversal in the Devices tab. The app…

How to Make an iOS Fractal App
Introduction In this tutorial we’ll be making an iOS app that renders the Mandelbrot Set and allows us to pan and zoom around it exposing beautiful and complex imagery. The end result will look like this: This tutorial we’ll be based on Fractals in Xcode 6 we’ll be using the shader code from there as a starting point. Expand below…

Introduction To SceneKit – Part 3
In this tutorial we’ll create a scene with a simulation of the classic Towers of Hanoi problem. We’ll create an animated solution for the problem and provide UI controls to interactively modify the number of disks. The final result will look like this: For a basic introduction to SceneKit have a look at Part 1 For more details on primitives have a look…

Introduction To SceneKit – Part 2
In this tutorial we’ll be looking at the various types of primitives you can use with SceneKit. We’ll look at how we can position objects in 3D space and ways of animating the positions of objects via actions. Here’s a SceneKit starter project with an empty scene to help you follow along. Geometries in SceneKit are instances of the SCNGeometry class. Geometries provide the…

Introduction To SceneKit – Part 1
TL;DR We’ll add SceneKit to a project and build a simple scene What is SceneKit? SceneKit is a powerfull high level framework for adding 3D graphics to your apps. You can use it to build games, interactive visualizations, 3D user interfaces or any kind of gaming or non-gaming appliclications. SceneKit has been around since 2012 but was previously only available on OSX.…

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