Skip to content

danteWei/Swift

Repository files navigation

Swift Repo Documentation

This is the repo where I upload my learning notes for swift (a new programming language created by Apple). This repo contains a palyground project, a text version of my notes, and a swift version of my notes.

I'll continue to upload my notes until I finish reading the book mentioned below.

If you know any of the following, Swift should not be hard for you:

  • Python

    • no semi-colons required
    • no main function required
  • Java

    • automatic reference counting, similar to garbage collector in Java, sort of...
  • C/Objective-c/cocoa touch, etc.

    • Swift is build on C and Objective-C

===

To interact with the codes in my notes, you need to have the follwing in the correct order:

  • An Apple developer acount (last time a checked, you don't need to enroll in any program)

  • a Machine that runs OS X 10.10 (there is only a beta version right now, but it is free for download if you are a developer).

  • Xcode 6 (again, there is only a beta version, and also free for developers).


##Topics Covered So Far##


  • Variables
    • Instances
    • Local variables
  • Control Flow
    • For loop
    • Switches
    • For-in
    • While
  • Functions & Closure
    • Function foundamentals
    • Nested functions
    • Closures
  • Classes & Objects
    • Class foundamentals
    • Initializer & de-initializer
    • Willset & Didset
    • Differences of methods vs functions
  • Enumerations & Structures
    • Enmueration foundamentals
    • Structure foundamentals

##Copyrights##


Most of the comments as well as the codes are direct quotes from the book Swift. This book is free and is available through iBooks Store. And it is the official book for learning Swift. If you really want to learn Swift, this book is a "must-have".

I do not own the materials in my notes, if you want to use the codes in my notes, please refer to the book mentioned above.

No commercial use of my notes is allow! Contact me first if you want to share the repo!

##Usage##


  • Go to the file menu and import the playground project into your Xcode and open the project; Or
  • Create your own playground project and copy & paste the contents into your playground file

You will see the codes in the left half of the screen, and the output in the right half


Author: Xinjing Wei

June 4th, 2014

About

Swift learning repo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages