Class and Struct in Swift

Download the playground file from github (Classes and Struct) Class A class is a blue print for a real-word entity such Player, Person etc. and it is used for creating objects. Class can have properties to store values and methods to add behaviour. Let us see this with an example class called Rectangle which has […]

Optional binding and Optional Chaining

Swift has a feature that lets users to assign optional value to a variable or a constant. Optional variable or constant can contain a value or a nil value. Let us take the following example which tries to find a given string in a array of string. Optional Binding var fruits = [“Apple”,”Orange”,”Grape”,”Mango”] let searchIndex […]

Get your current address in Swift (Swift 5)

In this Swift tutorial, we will see the steps required for using CoreLocation framework and retrieve the latitude and longitude of the location. Then use the CLGeocoder to reverse geocode the latitude and longitude details. This is a very basic tutorial that retrieves the location details on tap of a button and displays the information […]

Add line numbers in Word 2013, Word 2010 and Word 2007

Microsoft Word users can add line numbers to a word document using the options available as part of Page Layout menu. In this tutorial we will see the steps for adding line number in Word 2013 and Word 2011 for Mac. How to add line numbers in Word 2007, Word 2010, Word 2013 and Word […]

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

Swift – Beginners Tutorial

Swift is the latest programming language released by Apple for developing OS X and iOS apps. Best of C and Objective-C Adopts safe programming patterns and modern features Supports Playground, a tool for seeing the result immediately. Provides access to Cocoa libraries and can work in conjunction with Objective-C Combines Procedural and Object-Oriented programming. No […]

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

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