Multiple Views in Swift

When developing a Swift application in Xcode, as your application’s functionality expands, as does the need for more screens to show how the app can flow from one view to another. Multiple views in Swift can be implemented by following a few steps within Xcode.
Assuming you already have a single view application open already, …

Using CocoaPods with Swift

CocoaPods is a dependency manager tool used for mobile application projects, similar to how Composer is used for PHP, and NPM is used for Node.js. Using CocoaPods with Swift projects does not require much work, simply install the CocoaPods gem, add in your dependencies, run the install command and include the packages within your project.

Add Google Maps in Swift

To add Google Maps in Swift within your project, you will first need to download the Google Maps SDK for iOS.
You can either install the SDK using CocoaPods, or manually by downloading the zip file and adding the files into specific locations within your project in Xcode.
To install using CocoaPods, ensure that you …

Authenticate a User in Swift

Here we take a look at how to authenticate a user in Swift using a MongoDB database connection. A basic example of this can be seen by creating a login screen within Xcode. Whilst the swift code within Xcode won’t contain any database connection details itself, the application will use URLs derived from a Node.js …

Code Examples of Creating Objects in Swift

This article will look at a few code examples of creating objects in Swift 3 without using the Interface Builder. Whilst the IB in recent versions of Xcode has become more reliable and less buggy, many developers still wish to learn the code behind creating the view elements.
In addition to the Creating Elements using …

Create Elements Using Code in Swift

Recent versions of Xcode provide a sleek interface to be able to drag and drop elements onto the view. Some developers may want to learn how to create elements using code in Swift 3 rather than using the interface.
The UIKit provides a library that enables developers to create elements and add them to a …

Arrays in Swift 3

Arrays are data structures within programming and can be used to store a collection of elements. Arrays in Swift 3 are no different, however the syntax will vary between programming languages. Here we cover the basics of creating arrays, and adding and removing data from them.
To create an array, for example, an array to …

Change Element Properties in Swift 3

When adding elements from the Object Library into your application, you may need to update these elements using code when your application runs. Here we will look at how to change element properties in Swift 3.
In the IBActions article, we looked at how to change a button’s title using setTitle.

There are …

IBActions in Swift

In Xcode, to connect objects within your view to actual code you can use IBActions. This article will show you how to create IBActions in Swift 3 using Xcode 8.
With IBActions, you can connect actions from your Storyboard back to code within your ViewController.swift class. In this example, you will be shown how to …

IBOutlets in Swift

One of the features you can use to manipulate objects within the view are IBOutlets. This article will show you how to create IBOutlets in Swift 3 using Xcode 8.
IBOutlets are properties created within the ViewController class, the class that manages the view, which simply references an object created from the storyboard.
Creating IBOutlets …