Swift Cheat Sheet.

Arrays

var colors = ["red", "blue"]
var moreColors: String[] = ["orange", "purple"] // explicit type
colors.append("green") // [red, blue, green]
colors += "yellow" // [red, blue, green, yellow]
colors += moreColors // [red, blue, green, yellow, orange, purple]

var days = ["mon", "thu"]
var firstDay = days[0] // mon
days.insert("tue", atIndex: 1) // [mon, tue, thu]
days[2] = "wed" // [mon, tue, wed]
days.removeAtIndex(0) // [tue, wed]

Continue reading

Classes & Functions

Check out this fantastic video about swift classes and functions ! I am sure you will love it.

Enjoy the video.

#KeepCoding !

Feel free to ask questions or point out any mistakes. If you found this useful please take a moment to share this with your friends.

Have a lovely day !!

Introduction to Swift 101

Check out these 10 amazing videos from this amazing developer RM2KDEV.

Videos Cover the following topics :

Variable, Arrays, Conditional Statement, Functions, Classes, Inheritance and its application !

Must watch videos for beginners ! Enjoy !!

Feel free to ask questions or point out any mistakes. If you found this useful please take a moment to share this with your friends.

Have a lovely day !!