Join Jon Bott for an in-depth discussion in this video Simple observable, part 2, part of RxSwift: Design Patterns for iOS Developers.
- [Instructor] So we've seen one way…how we can create observables.…There's other ways of creating even simpler observables.…So first, we'll say func creatingObservables,…and in here, I'll say let observable equal to…Observable.just, and this literally means…just make one observable or an observable…containing one element, and for this, we'll say…observable.subscribe,…and I'll say number.…
We'll print that number.…And then we'll also do an onCompleted in here.…Don't worry about Disposed.…I will dispose of it by that bag, and in here,…we'll say "No more elements... ever"…because this observable has just one item.…
Let's go up to AppDelegate, and start using that.…I'll run this, come back to here.…So if you want to create an observable really quickly,…you can just use the observable.just.…Let's go look at the output.…We did see that we got 23 and then we got no more elements.…There's a couple of other ways…that you can create an observable as well.…
I'll go ahead and collapse that.…And we'll say, let observable equal to Observable.from,…
- 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.