Swift Tutorial

I’ve just started to learn Swift programming language after 4 years Objective C development experience. I want to share my experience in Swift language and tell about concepts in a very brief, clean and simple way as much as I can.

Screen Shot 2016-01-23 at 14.20.05First I started to use a playground to learn by experiencing and looking exact results without compiling and running. Playgrounds are very effective to write a code without having / opening any Swift project.

Being a learner / a starter / a newbie again was a little hard. You have to put all your learnings in Objective C to another space in your mind and think as simple as you can. In my very fist swift code, I found myself in a search for “how to make category (extension) in swift?”

After learning how to define constants (let), variables (var) and how to call methods. I tried to make a image with using a color, because of I didn’t find the backgroundColor property of a UIButton, all I’ve found is backgroundImage so I think I should write a extension to UIImage for having a initialising method by color. Yes, I wrote by digging a little into codes and stack overflow. But it takes some time, so I decide to learn in very beginning of Swift language and lead the way for developers like me (know Objective C very deeply and need to start learning Swift in a very clean, easy and fast way.)

This way please!

Part 1 – Define variables, constants and simple object types – Swift Hello World!
Part 2 – Use if, switch, for, for-in, while, repeat-while statements – Control Flows
Part 3 – Functions & Closures – How to call and define them
Part 4 – Objects & Classes – get, set, willSet and didSet methods of Properties
Part 5 – Enumerations & Structures – enum & struct in Swift

…To be continued!…

4 thoughts on “Swift Tutorial

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s