mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-24 01:51:38 +00:00
Include MARK style and two collection declarations
Added MARK with separator and a couple of mutable explicit declarations of empty Array/Dictionary
This commit is contained in:
parent
f0a4c88acf
commit
9530122a1c
@ -25,6 +25,7 @@ import UIKit
|
|||||||
|
|
||||||
// Xcode supports landmarks to annotate your code and lists them in the jump bar
|
// Xcode supports landmarks to annotate your code and lists them in the jump bar
|
||||||
// MARK: Section mark
|
// MARK: Section mark
|
||||||
|
// MARK: - Section mark with a separator line
|
||||||
// TODO: Do something soon
|
// TODO: Do something soon
|
||||||
// FIXME: Fix this code
|
// FIXME: Fix this code
|
||||||
|
|
||||||
@ -128,6 +129,7 @@ shoppingList[1] = "bottle of water"
|
|||||||
let emptyArray = [String]() // let == immutable
|
let emptyArray = [String]() // let == immutable
|
||||||
let emptyArray2 = Array<String>() // same as above
|
let emptyArray2 = Array<String>() // same as above
|
||||||
var emptyMutableArray = [String]() // var == mutable
|
var emptyMutableArray = [String]() // var == mutable
|
||||||
|
var explicitEmptyMutableStringArray: [String] = [] // same as above
|
||||||
|
|
||||||
|
|
||||||
// Dictionary
|
// Dictionary
|
||||||
@ -139,6 +141,7 @@ occupations["Jayne"] = "Public Relations"
|
|||||||
let emptyDictionary = [String: Float]() // let == immutable
|
let emptyDictionary = [String: Float]() // let == immutable
|
||||||
let emptyDictionary2 = Dictionary<String, Float>() // same as above
|
let emptyDictionary2 = Dictionary<String, Float>() // same as above
|
||||||
var emptyMutableDictionary = [String: Float]() // var == mutable
|
var emptyMutableDictionary = [String: Float]() // var == mutable
|
||||||
|
var explicitEmptyMutableDictionary: [String: Float] = [:] // same as above
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
|
Loading…
Reference in New Issue
Block a user