Viewing: Swift

Quotes app – Simple page based application in Swift

This is a very basic tutorial on how to create a simple page based app in Swift. We are going to use Page Based Application project template for displaying quotes in different pages. Now we need to provide the required data for the display. Click ModelViewController.swift and change the pageData variable in to a constant and […] Read More

Internationalization and localization of Apps in Xcode 6 and Swift

Internationalisation and Localization of apps is essential when you want the apps to seamlessly support different languages and region. Internationalization refers to process of providing a framework to the app for supporting multiple languages. And Localization refers to the process of making your app to support a particular locale such as GermanIn this tutorial, we […] Read More

BlogReader App in Swift

In this iOS development tutorial, we will see how to write a blog feed Reader app in Swift Programming Language. For this demo, let us take the blog feed (http://rshankar.com/feed) from Learning Swift and iOS Development blog. This is a Wordpress blog and the number of posts in the feed is set to 10 (This […] Read More

Get your current address in Swift

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 writes the information […] Read More

UIGestureRecognizer in Swift

In this short tutorial, we will see the steps required for implementing UIGestureRecognizer in Swift programming language. Let us take the previous Stop Watch demo code and implement tap, double tap and swipe gestures. You can download source code for Stop Watch from here. The following features will be implemented using the UIGestureRecognizer. Tap - […] Read More

Simple StopWatch app in Swift

In this tutorial, we will see the steps for creating simple StopWatch app in Swift Programming language as shown in the below screenshot. Click File menu -> New -> select Project from menu list. Choose the template as Single View Application and click Next button. Enter name of the Product, Language as Swift then click […] Read More

CoreData tutorial in Swift using NSFetchedResultsController

Let us see an example TaskManager app using CoreData written in Swift Programming language. This app provides the following functionality Allow users to enter new task Update existing task delete task You can download source code for this project from Github. If you are familiar with user interface then move on to the Core Data […] Read More

Swift – WebView demo

In this short tutorial, we will see an example in Swift programming language using UIWebView. The WebView will load a webpage and provide option to refresh, stop, go back and go forward. This tutorial should give a brief overview on how to declare IBAction, IBOutlets and use Objective-C classes (NSURL and NSURLRequest) in Swift Interface […] Read More

Insertion Sort

Insertion Sort algorithm does the following Keeps the sorted numbers from left to right. Compares the left with right and interchanges the number if left is greater than right. Here is code snippet of Insertion Sort in Swift […] Read More

Reverse a String in Swift

Here is a simple code snippet written in Swift programming language for reversing a string. import Cocoa //Assigning a value to a String variable var str = "Hello, playground" //Create empty character Array. var strArray:Character[] = Character[]() //Loop through each character in the String for character in str { //Insert the character in the Array […] Read More