Chapter 05: Let’s Learn Swift Programming Language – Dictionary in Swift

What is Dictionary?

Dictionary is unordered List which can be quickly access by key

Here is how you can declare Empty Dictionary


var emptyDictionary = [String : Int]()

Dictionary with Predefined Key Pairs


var apps = ["Productivity" : "Keynote", "Social" : "Facebook", "Music" : "iTunes"]

Accessing First Key Element of Dictionary

var optionalApp = apps["Productivity"] // Keynote


Continue Reading Post

Chapter 04: Let’s Learn Swift Programming Language – Array in Swift

What is Array?

Array is an ordered list with indices / Index
Example of an Array can be a to do list, Shopping list, Amazon Wish List etc.

Let’s say we have an array list of apps

Index: 0 1 2 3
Element: “Reminders” “Mail” “Xcode” “Calendar”


Important Note: Index of first element is always start with zero because way computer scientist deal with data in memory they have offset & offset starts with zero & thats why array starts with zero. Index of an array never exceed the number of elements.


Here is how to declare Array in Swift: We will declare array with let or var keyword then identifier name then equal sign & then square brackets. Each elements are separated with comma.


var apps = ["Reminders", "Mail", "Xcode", "Calendar"] // Array of Strings, Each element is of Type String
var number = [1, 2, 300, 4000] // Array of Integers, Each element is of Type Integer
var bools = [true, false, false, true] // Array of Boolean values, Each element is of Type Bool
var groups = [["John", "Tom", "Steve"], ["Brandon", "Bill"]] // Array inside array


Continue Reading Post

Chapter 03: Let’s Learn Swift Programming Language – String in Swift

All About String in Swift Programming Language

Let’s know what is String, String is collection of characters

Here is how to declare a String

var courseName = "iOS Development"
var language = "Swift"

Here is how to use functions like String Concatenation i.e. attaching one string to second string

var hello = "Hello, "
let world = "World! "
let sentence = hello + world + "This is iOS Development" // "Hello, world! This is iOS Development"


Important Note: As you can see above we have used “+” operator to concatenate two strings together


Continue Reading Post

Chapter 02: Let’s Learn Swift Programming Language – Variables & Constants in Swift

Data Types in Swift Language

Integers i.e. Int: 1, 2, 3, 199, 1000
Float & Doubles: 3.14, 1.168, M_PI
Boolean Values like Bool: true or false
Collection of Characters like Strings: “iOS Development”, “Apple”, “1.2”
We can create our own data type using keywords Struct & Class.

All About Variables


Here is how we declare Variables in Swift: First we start with ‘var’ keyword then ‘Identifier Name’ & ‘Initial Value’

Here is how to Declare Integer values: Int

var thisYear = 2017
var ourAge = 20

Here is how to Declare Empty Integer

var emptyInteger = Int()

Here is how to Declare String

var courseName = "iOS Development"
var language = "Swift"
var software = "Xcode"


Continue Reading Post

Chapter 01: Let’s Learn Swift Programming Language – Introduction to Swift & All about Swift

About Swift

Swift Programming Language is new sensation or new happening thing or next paradigm in computer programming world. Swift was introduced by Apple in WWDC – Apple’s World Wide Developer Conference in Year 2014. Apple declared Swift as OpenSource Programming Language on 3rd December 2015.

Swift is getting vary warm welcome from development community as breath of fresh air for their daily programming job.

Swift natively support Unicode Characters, Emojis, Asian Languages like Devanagari Characters & Chinese Characters. Which was lacking in 30 Year old programming Languages like C & Objective-C

Here is what others are saying about Swift Programming Language from Apple to wikipedia.


Continue Reading Post

How to write Language C or C++ Program on Macintosh OSX using Xcode

I assume that you are on latest Mac with Xocde 5 or later already installed on your mac from Mac App Store.

SO here is how to write Language C or C++ Program Code on Macintosh OSX using Xcode.


Note: Writing a C or C++ specific code only differs on Step 05 every other step is the same.


Step 01 is to Navigate to ‘Application’ folder & double click on ‘Xcode’ Application

OR Click on ‘Spotlight’ at top left menu bar of your Mac & type ‘Xcode’ press return key on keyboard after getting appropriate search results


Continue Reading Post

Happy coding & well wishes from Mandar Apte

Hi All Developers & yes Designers too,

I feeling happy to announce on the day of ‘Vijaya Dashmi’ that I will blog & share code snippets for learning coding & development which will be help full for beginners & advance users.

I am going to start from C Language then move on to C++ & then in future to Objective C Language.

Hope this journey goes well for me & all of us.


Continue Reading Post