Join Jon Bott for an in-depth discussion in this video Subjects, part 1, part of RxSwift: Design Patterns for iOS Developers.
- [Instructor] Let's take a look at the next type…of observable, which is subjects.…I'm going to come down here…and make a new extension.…We'll call it SimpleRx again.…Let's put a region around here, MARK subjects,…and let's make a function again…that will trigger in a moment.…Subjects, and in here let's go ahead…and collapse this lower panel.…Give us some more space to work with down here.…
We'll say let…behaviorSubject…equal to BehaviorSubject,…and we'll a default value of 24.…Again, subjects are just like observables or variables.…They're generics.…In this case, it's inferring that it is of type integer.…We'll say BehaviorSubject.subscribe.…With behavior subjects we can can get…error events and onCompleted events, unlike variable.…
In here, I'm going to just say a newValue,…and we'll come into the onError.…We'll just say error.…We need that a lowercase, completed.…Basically we're just going to be filling out…each of these blocks…and putting some sort of print statement in there…so that we can see that something is happening.…
- RxSwift syntax
- Creating simple observables
- Architecting the model layer
- Using Core Data
- Grouping tasks
- Changing UI
- Threading in the model and UI
Skill Level Intermediate
Learning Server-Side Swift Using IBM Kiturawith Mohammad Azam1h 51m Intermediate
Swift 4: Protocol-Oriented Programmingwith Károly Nyisztor1h 44m Intermediate
Swift: Writing Reusable Frameworkswith David Okun1h 49m Intermediate
1. The Basics
2. Model Layer
3. Presenter and View
Next steps1m 17s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.