Skip to content

Commit dc22a4f

Browse files
author
Bob Lee
committed
Edited source code for Ch3, 4
1 parent ce15d19 commit dc22a4f

10 files changed

+10
-11
lines changed

course/functional-swift/capture-lists.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ smartClosureArray[4]() // 4 🎅
158158
[Capture List in Closures]: https://blog.bobthedeveloper.io/swift-capture-list-in-closures-e28282c71b95
159159

160160
### Source Code
161-
[3004_capture_lists.playground](https://www.dropbox.com/sh/4gn1y6if86aeciw/AABVwstQZJCqGnNfKPfRo76ja?dl=0)
161+
[3004_capture_lists.playground](https://www.dropbox.com/sh/ickz77fu1d6bwzo/AAC8YOA56o09C8OT7IRujOoma?dl=0)
162162

163163
## Conclusion
164164
You've learned the default behavior of a closure block which is identical to that of instances created with class objects. In fact, closures are reference types. In Chapter 5, however, you will discover some of problems that may arise due to the default behavior. Stay tuned.

course/functional-swift/completion-handlers.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ downloanAnImage { (isSuccess: Bool) in
7474
```
7575

7676
### Source Code
77-
[3006_completion_handlers.playground](https://www.dropbox.com/sh/t47kpcnzuhtgni9/AAA1Yvq52s6XVOFgMLRjOPRka?dl=0)
78-
77+
[3006_completion_handlers.playground](https://www.dropbox.com/sh/0ymk6l2ot39grhw/AADKAm7r7OmKbTpBKyNh25Lpa?dl=0)
7978
### Resources
8079
[Completion Handlers in Swift with Bob]
8180

course/functional-swift/intro-closure-part1.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ callStringWtihClosureFour // () -> String
119119

120120

121121
### Source Code
122-
[3001_intro_closures_part1.playground](https://www.dropbox.com/sh/dz7zn4gthlms8oh/AAAlcQb3Nu_SD2X3NDLRnZxKa?dl=0)
122+
[3001_intro_closures_part1.playground](https://www.dropbox.com/sh/6xqrgg0ixesg1ip/AABWiMy3EFt9aaraSABzCChea?dl=0)
123123

124124

125125
## Conclusion

course/functional-swift/intro-closure-part2.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ insertClosureBlock(closureBlock: { "hello" })
105105
No Fear Closures with Bob [Part 1](https://medium.com/ios-geek-community/no-fear-closure-in-swift-3-with-bob-72a10577c564#.m832h4jppz) and [Part 2](https://medium.com/ios-geek-community/no-fear-closure-in-swift-3-with-bob-72a10577c564#.m832h4jpp).
106106

107107
### Source Code
108-
[3002_intro_closures_part2.playground](https://www.dropbox.com/sh/dws40juw0rrx9mn/AACQjdv5oVoqNrB8ar2skfXva?dl=0)
108+
[3002_intro_closures_part2.playground](https://www.dropbox.com/sh/9otg5tvwsu6v4tu/AACZbraHNlnvc39Vppz7Rcdsa?dl=0)
109109

110110
## Conclusion
111111
You've learned how to pass and return a closure block directly and indirectly within a function. The is the fundamental root of functional programming which I'm not going to dive much into in this course. You may sign up for my mailing list if you are interested in learning about reactive programming with RxSwift and MVVM.

course/functional-swift/lazy-init-closures.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class CompressionManager {
185185

186186

187187
### Source Code
188-
[3003_lazy_init_closures.playground](https://www.dropbox.com/sh/tdmnhesaeqlwox4/AAA1aCtKuhI1V1YXJkaV2L05a?dl=0)
188+
[3003_lazy_init_closures.playground](https://www.dropbox.com/sh/3oghlxujs8doq1t/AAB6rcaEstTpO0tbxYCveMC9a?dl=0)
189189

190190
## Conclusion
191191
You've learned how to initialize an object using closures instead of the tedious method above. I do not use `Storyboard`. In fact, I have a "library" of UI Components so that I don't waste time typing all day. I just copy the closure block from the library and modify a little. Second, you've learned to use the `lazy` keyword in front of a property that requires heavy computing.

course/functional-swift/trailing-closures.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ trailingClosures(number: 400) { $0 * $0 }
6969
```
7070

7171
### Source Code
72-
[3005_trailing_closures.playground](https://www.dropbox.com/sh/ahn75farmnscvxy/AADFWLKiwFwJoyMjd2dTFbwCa?dl=0)
72+
[3005_trailing_closures.playground](https://www.dropbox.com/sh/7nbfv0i4csk6spu/AACDhF28dvxKK-FdzviNWDWTa?dl=0)
7373

7474

7575
## Conclusion

course/protocol-oriented-swift/delegate.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ When the the `passData` method is called from the `firstVC`, `secondVC` contains
7272
7373
### Source code
7474

75-
[4004_delegate.playground](https://www.dropbox.com/sh/j7xreau3y2kq8bo/AACG17ayoM8W8JMM3O6jbB5ya?dl=0)
75+
[4004_delegate.playground](https://www.dropbox.com/sh/s2ttgjx7yhucyyu/AAC9ROxz-_X8yKy2wxJK_QLfa?dl=0)
7676

7777
### Resources
7878
[Introduction to Delegate in Swift]

course/protocol-oriented-swift/intro-protocol.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ struct Human: Breathable {
113113
| Computed Property --> Gettable, Settable (Optional) | Computed Property --> Gettable, Settable (Must) |
114114

115115
### Source Code
116-
[4001_intro_protocols.playground](https://www.dropbox.com/sh/yk5uq09o8y4ob61/AABd3FKbRtI0mi4j77jAYrtma?dl=0)
116+
[4001_intro_protocols.playground](https://www.dropbox.com/sh/33ps05ocvmtwiy4/AAC7oBX0z3Omt01J0lHHkhNpa?dl=0)
117117

118118
### References
119119
[All evidence points to OOP being bullshit by John Barker ](https://content.pivotal.io/blog/all-evidence-points-to-oop-being-bullshit)

course/protocol-oriented-swift/protocol-extension.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Hexagon.init().calculateArea(side: 6, length: 10)
8484
If you are interested in how you may apply `Protocols` to UIKit, you may read [Protocol Oriented View with Bob (Blog)](https://medium.com/ios-geek-community/protocol-oriented-programming-view-in-swift-3-8bcb3305c427#.u3rr936vm).
8585

8686
### Source Code
87-
[4002_protocol_extension.playground](https://www.dropbox.com/sh/zjn5tytza7yycwp/AADSzYya-HOgr0UDaOfj6H46a?dl=0)
87+
[4002_protocol_extension.playground](https://www.dropbox.com/sh/u7sp5fmgbf5l3p4/AABfXD34FO40GiQjDkhcXAN7a?dl=0)
8888

8989
## Conclusion
9090
Protocol Oriented Swift is only limited by your imagination.

course/protocol-oriented-swift/protocol-type.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ stateThePrice(enterGem: Ruby())
105105
```
106106

107107
### Source Code
108-
[4003_protocol_type.playground](https://www.dropbox.com/sh/vvy34bgbyio7k4p/AADYOs3OUaU38RSdN4HaG4OWa?dl=0)
108+
[4003_protocol_type.playground](https://www.dropbox.com/sh/z5o36isv7jvzsfo/AACIeaZ34TreiJ67IOOeB3CGa?dl=0)
109109

110110
### Resources
111111
[Intro to Protocol Oriented Programming](https://medium.com/ios-geek-community/introduction-to-protocol-oriented-programming-in-swift-b358fe4974f#.cwpeva7h8)

0 commit comments

Comments
 (0)