Skip to content

Instantly share code, notes, and snippets.

View cyyeh's full-sized avatar
👋
Focusing

Chih-Yu Yeh cyyeh

👋
Focusing
View GitHub Profile
@cyyeh
cyyeh / swift-enumerations.swift
Created February 28, 2019 02:49
Swift Enumerations
/*
Referenced from Stanford CS193p
#: important
##: very important
Enumerations
- Enumeration Syntax
- Matching Enumeration Values with a Switch Statement
- #Associated Values
@cyyeh
cyyeh / swift-initialization.swift
Created February 27, 2019 11:07
Swift Initialization
/*
Referenced from Stanford CS193p
#: important
##: very important
Initialization
- Setting Initial Values for Stored Properties
- ##Customizing Initialization
- Default Initializers
@cyyeh
cyyeh / swift-inheritance.swift
Created February 27, 2019 08:12
Swift Inheritance
/*
Referenced from Stanford CS193p
#: important
##: very important
Inheritance
- Defining a Base Class
- Subclassing
- Overriding
@cyyeh
cyyeh / swift-methods.swift
Created February 27, 2019 07:55
Swift Methods
/*
Referenced from Stanford CS193p
#: important
##: very important
Methods
- Instance Methods
- The self Property
- Modifying Value Types from Within Instance Methods
@cyyeh
cyyeh / swift-properties.swift
Created February 27, 2019 07:30
Swift Properties
/*
Referenced from Stanford CS193p
#: important
##: very important
Properties
- Stored Properties
- Property Observers
- Global and Local Variables
@cyyeh
cyyeh / swift-structures-classes.swift
Created February 27, 2019 06:41
Swift Structures and Classes
/*
Referenced from Stanford CS193p
#: important
##: very important
Classes and Structures
- Comparing Classes and Structures
- #Structures and Enumerations Are Value Types (ignore enumerations)
- Classes Are Reference Types
@cyyeh
cyyeh / swift-functions.swift
Last active February 27, 2019 12:20
Swift Functions
/*
Referenced from Stanford CS193p
#: important
##: very important
Functions
- Defining and Calling Functions
- Function Parameters and Return Values
- Functions Without Parameters
@cyyeh
cyyeh / swift-control-flow.swift
Last active February 27, 2019 12:04
Swift Control Flow
/*
Referenced from Stanford CS193p
#: important
##: very important
Control Flow
- For-In Loops
- While Loops
- Conditional Statements
@cyyeh
cyyeh / swift-collection-types.swift
Last active February 27, 2019 11:57
Swift Collection Types
/*
Referenced from Stanford CS193p
#: important
##: very important
Collection Types
- #Mutability of Collections
- #Arrays
- Sets
@cyyeh
cyyeh / swift-strings-characters.swift
Last active February 27, 2019 11:48
Swift Strings and Characters
/*
Referenced from Stanford CS193p
#: important
##: very important
Strings and Characters
- String Literals
- Initializing an Empty String
- String Mutability