How to Access the User’s Location in iOS Apps

Hello World! In this post, we’re going to look at how we can retrieve the user’s location as pure data and as a position on a map. We’ll look into the CoreLocation and MapKit modules and build an app that will display some diagnostic information like latitude, longitude, altitude, and accuracy. Right underneath those fields, we’ll have a map view that will … Read more

How to Navigate Between View Controllers in iOS

Hello World! In this post we’re going to learn how to effectively navigate between two or more view controllers using segues and a UINavigationController. We’ll also see how we can pass data between them using properties. We’ll be building a small app that will use a UINavgiationController to navigate between two view controllers and pass data between them … Read more

How to Pull Internet Data in iOS Apps

Hello world! In this post, we’re going to learn how to use the new NSURLSession class to quickly and efficiently connect to the internet and pull data. We’ll be using the OpenWeatherMap API to build a very simple forecasting app. In addition, we’ll also be learning about grand central dispatch (GCD) and how multithreading works in iOS. Download the … Read more

How to Create Dynamic Lists of Items with UITableView

Hello world! In this post, we’re going to learn how to use UITableView to create dynamic lists of items. We’ll create a very simple app that will display a list of healthy foods. More importantly, we’ll learn how to configure UITableView to show a list of any size; we’ll also learn how UITableView works under-the-hood so … Read more

How to Build an iOS Unit Converter App with Swift – Part 2

Hello World! This is the 2nd and final part of our Unit Converter post. In this post, we’re going to finish our Unit Converter app and see it working in our emulator! We’ll delve into UIPickerView and learn about delegates and data sources! Let’s get started! Since we’re finished with the UI and model, we need to wire everything in our UIViewController subclass. … Read more

Working with Closures in Swift

Closures Closures are small, self-contained blocks of code that can be used in our code, not unlike a function. (The reason these are called closures is because they’re said to “close” over constants and variables.) Let’s first get some context for closures. Suppose we have an array of names that we want to sort. Well it turns … Read more

How to Build an iOS Unit Converter App with Swift – Part 1

Hello world! In this post, we’re going to start building our first real-world app: a unit converter! With it, we hope to quickly convert between different units of length. This is Part 1 of the Unit Converter app post. In this part, we’ll learn about the Model-View-Controller pattern of iOS, UIPickerView, Swift enumerations, and static methods. We’ll also finish our UI and … Read more

How to Create Basic UI Controls in iOS

Hello World! In this post, we’re going to go more in-depth into some of the most basic UI controls that iOS supports. We’ll be covering a large number of different UI controls like text fields, buttons, switches, steppers, and sliders. These are the fundamental building blocks of any iOS app so we’ll start our journey here. We’ll also learn what delegates are in … Read more

Hello World – First Steps with iOS

Hello world! In this post, we’re going to get started with iOS development using Swift! We’ll start by building a simple Hello World app that will allow the user to enter their name and push a button; then the text in the middle will change to say “Hello” and the entered name. Download the source code . Learn iOS by building real apps Check out … Read more

Swift Tutorial 6 – How to Use Functions in Swift

In this post, we’re going to learn about how to define and call various types of Swift functions. A function is a self-contained block of code whose purpose is to perform a specific task. We use functions so that we can break up the main source code into manageable chunks. Also, if we need to repeat code, we can … Read more