How to customize status bar in iOS

Status Bar appears at the top of your device displaying information such as battery left in your device and carrier details. The default style of status bar is black and looks as shown in the below screenshot. But if your screen designs are dark then you can change the status bar style to Light Content. […]

Add annotations and Polyline to MapView in Swift

In this article, we will see the instructions for adding annotation to MapView, Draw Polylines and Zoom to a region in Swift. Let us see this by adding stations to a Map for Chennai subrban trains and connect these stations using Map Overlay. Project Setup   Create a new project by selecting Single View Application […]

DatePicker Demo in Swift

In this short tutorial, we are going to see the steps required use DatePicker in a iOS / Swift project. This demo is done by adding the DatePicker controls to Interface Builder and not programmatically. Date Picker Mode Date Picker control allow developers to specify the mode such as Date, Time, Date and Time and […]

Tuples, Enums and Protocols in Swift

Tuples in Swift allows user to assign group of values to a variable, constant and even return parameter of a function. In the below example, a employee constant is assigned Int and String values. And to access these parameters, we need to use .0 and .1 [code language=”swift”]let employee = (103, “Deepak”) employee.0 employee.1[/code] Now […]

Retrieve list of Twitter followers using Swift

This article provides details about the the steps required to retrieve the followers in from your twitter account. You will learn the following by going through this article Use oAuth to retrieve bearer token. Retrieve twitter followers using API call. Last 20 followers name and profile image will be displayed in a tableview. Download the […]

How to record and play sound in Swift

In this tutorial, we are going to see the required steps to record and play sound in Swift Programming language using AVAudioRecorder and AVAudioPlayer Download source code from github (SoundController.swift) User Interface The user interface for this demo is simple with two buttons, one for recording and another for playing sound. Create corresponding IBAction and […]

UITextFieldDelegate in Swift

This is a beginners tutorial on UITextFieldDelegate in Swift. We are going to see how to use UITextFieldDelegate by writing a Simple Interest Calculator. Download the source code from here This calculator uses UILabels and TextFields for displaying and accepting amount and interest. We are going to use the UITextFieldDelegate method to navigate from “Principal […]

SplitViewController example in Swift

This is a beginners tutorial on SplitViewController using Interface builder with programming language as Swift. There are also some good articles available on SplitViewController, check them out as well – nhipster and whoisryannystrom. Create a new Single View Application. Choose Language option as Swift and provide a product name. Navigate to Main.Storyboard and select default […]