Skip to content

Commit 94c0e14

Browse files
author
Bob Lee
committed
Updated to Swift 4: 1009, 1010. 1011
1 parent bd7ffe0 commit 94c0e14

File tree

5 files changed

+9
-16
lines changed

5 files changed

+9
-16
lines changed

course/swift-fundamentals/class-struct-difference.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,4 @@ To learn more about cons of Object Oriented Programming, you may read the beginn
158158
## Conclusion
159159
You've learned the distinction between`classes` and `structs` when it comes to creating objects. Instances with `classes` have references to the object while with`structs` store. As a result, `classes` are called reference types while `structs` and `enums`, are value types.
160160

161-
At this point, you may find no incentive to learn the difference. You are right. For small apps, it doesn't matter. But, once you start implementing `closures` and `delegates`, and other reference related tasks, you would soon discover a little more complexity which you will learn how to solve in Chapter 5. You will appreciate value types along with Protocol Oriented Programming soon.
162-
163-
> **Note:** Learn Swift with Bob is available on [Udemy](https://udemy.com/learn-swift-with-bob/). If you wish to receive a discount link, you may sign up [here](https://goo.gl/RR4K27).
161+
At this point, you may find no incentive to learn the difference. You are right. For small apps, it doesn't matter. But, once you start implementing `closures` and `delegates`, and other reference related tasks, you would soon discover a little more complexity which you will learn how to solve in Chapter 5. You will appreciate value types along with Protocol Oriented Programming soon.

course/swift-fundamentals/extension.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,11 @@ As mentioned, `extension` allows developers to implement all kinds of features.
100100

101101

102102
### Source Code
103-
[1010_extension.playground]https://www.dropbox.com/sh/dq1288vcb77fzk6/AADgJhq0idPwIFTOTbysAxW7a?dl=0)
103+
[1010_extension.playground](https://www.dropbox.com/sh/dq1288vcb77fzk6/AADgJhq0idPwIFTOTbysAxW7a?dl=0)
104104

105105
## Conclusion
106106
You've learned the meaning of `self`. I use `extension` to modularize view controller to prevent MVC, a.k.a, Massive View Controller.
107107

108108
In Chapter 4, you will learn the sheer power of `extension` along with `protocols` If you are interested in learning how to build apps with `Protocols` and best practices that I know of, you may join the VIP list for the upcoming course: [The UIKIt Fundamentals with Bob].
109109

110110
[The UIKIt Fundamentals with Bob]: /ABOUT.md/#course
111-
112-
> **Note:** Learn Swift with Bob is available on [Udemy](https://udemy.com/learn-swift-with-bob/). If you wish to receive a discount link, you may sign up [here](https://goo.gl/RR4K27).

course/swift-fundamentals/intro-operators.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
## Introduction
44
Welcome to Lesson 11 of The Swift Fundamentals. In Lesson 9, You've tasted the power of Swift operators for replacing a traditional `else-if` statement with a tertiary operator. In this lesson, you will be able be recognize a number of operators and use them when appropriate.
55

6-
76
## Problem
87
Write less, produce more
98

@@ -103,8 +102,6 @@ The above states that if `age` contains `nil`, use `defaultAge` instead. Nice an
103102
[1011_operators.playground](https://www.dropbox.com/sh/pbsgi6bt9p35k9k/AADx8qk44wOpMC5hgmd2DYrna?dl=0)
104103

105104
## Conclusion
106-
You've only scratched the surface. In Chapter 8, you will learn how to create your own operators. I know you are excited. Stay consistent and you will get there, hopefully soon.
105+
You've only scratched the surface. In Chapter 10, you will learn how to create your own operators. I know you are excited. Stay consistent and you will get there, hopefully soon.
107106

108107
In the next lesson, you will learn how to create fake names for types. Keep marching forward.
109-
110-
> **Note:** Learn Swift with Bob is available on [Udemy](https://udemy.com/learn-swift-with-bob/). If you wish to receive a discount link, you may sign up [here](https://goo.gl/RR4K27).

course/swift-fundamentals/set-tuple.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Set and Tuple
22

33
## Introduction
4-
Welcome to Lesson 9 of The Swift Fundamentals. There are two objects. The first is to learn how to group a list of items with `sets`. The second is to work with various types within a single variable/constant with `tuples`.
4+
Welcome to Lesson 9 of The Swift Fundamentals. There are two objectives. The first is to learn how to group a list of items with `sets`. The second is to work with various types within a single variable/constant with `tuples`.
55

66
## Problem
77
1. I'd love to eliminate duplicated items: `sets`
@@ -146,7 +146,7 @@ let sortedArrayFromHighToLow = evenNumberSet.sorted { $0 > $1 }
146146
print(sortedArrayFromHighToLow) // [100, 98, 96, ...]
147147
```
148148

149-
In this course, you are not going to learn how `sorted()` is constructed. However, if you are interested in learning more about Functional Programming with MVVM, you can be on the mailing list for my [upcoming courses](/ABOUT.md#course).
149+
In this course, you are not going to learn how `sorted()` is constructed. However, if you are interested in learning more about Functional/Reactive Programming with RxSwift and MVVM, you can be on the mailing list for my [upcoming courses](/ABOUT.md#course).
150150

151151
### Practical Usage of Set
152152
- Finding unique letters and unique visitors
@@ -155,7 +155,7 @@ In this course, you are not going to learn how `sorted()` is constructed. Howeve
155155
## Introducing Tuples
156156
You may combine multiple types of value in a single `let` or `var`.
157157

158-
```swif
158+
```swift
159159
let firstScore = (name: "Bob", score: 9)
160160
```
161161

@@ -231,6 +231,7 @@ for (index, value) in shoppingList.enumerated() {
231231

232232
### Reference
233233
[Swift API Design Guidelines](https://swift.org/documentation/api-design-guidelines/)
234+
234235
## Conclusion
235236
To recap, `Set` is used to group non-duplicate items with no order. `Tuple` is used to group all kinds of types with the order you define. Second, you've learned how to identify mutating vs non-mutating methods based on the naming guide. Make sure you follow the same principle in your codebase as well. Don't get too caught up with Functional Programming. I know it sounds cool. You will get a taste of it in chapter 3, Intro to Functional Swift.
236237

course/swift-fundamentals/typealias.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Welcome to the last lesson of The Swift Fundamentals. You've come a long way. Yo
77
The parameters are unreadable and boring
88

99
> **Typealias:** A false or assumed identity. - [Oxford Dictionary]
10+
1011
[Oxford Dictionary]: https://en.oxforddictionaries.com/definition/alias
1112

1213
### Typealias for String
@@ -58,12 +59,10 @@ var optionalOne: String?
5859
var optionalTwo: Optional<String> // Generic Enum
5960
```
6061

61-
> You will learn more about `Optionals` in Chapter 7.
62+
> You will learn more about `optionals` in Chapter 8: Advanced Enums.
6263
6364
### Source Code
6465
[1012_typealias.playground](https://www.dropbox.com/sh/14785va0a9oor2x/AADwfnJXD17kyB36ch0LA8A4a?dl=0)
6566

6667
## Conclusion
6768
That's it. You've learned how fake.
68-
69-
> **Note:** Learn Swift with Bob is available on [Udemy](https://udemy.com/learn-swift-with-bob/). If you wish to receive a discount link, you may sign up [here](https://goo.gl/RR4K27).

0 commit comments

Comments
 (0)