Announcing: “Modern Concurrency in Swift”

I’m incredibly happy to share that today the new raywenderlich.com book “Modern Concurrency in Swift”, that I’ve been working on, is available at www.swiftconcurrencybook.com! Together with editors Sandra Grauschopf, Felipe Laso-Marsetti, Richard Turton, and Shai Mishali, we’ve been working very hard to get a book out as soon as possible on the newly released in 2021 Swift Concurrency: The book is written in the classic raywenderlich.com style that mixes key pieces of theory with step-by-step instructions, guiding the readers through working on practical, real-life projects.

Binding to a table view with multiple cells and sections

One of the questions that keeps popping up in the RxSwift Slack channel for years now is how to display multiple cell types when binding data to a table view. This is actually very easy to do and in this post I’ll show you two distinct ways to display multiple cells in a table view (and it works identically for collection views if that’s what you’re looking for). We’ll look at the following two use cases:

Testing with RxBlocking, part 2

Previously, I wrote about the basics of testing with RxBlocking in Testing with RxBlocking, part1. Since then, I presented 2 times at meetups about MVVM and RxBlocking and I thought I’d post few more examples in a broader context. But first a question I got several times already when discussing RxBlocking. When to use RxBlocking vs. RxTest? RxTest is a great library for testing RxSwift code. It offers everything you need to test your Rx code and in most cases it’ll be everything you need.

Testing with RxBlocking, part 1

Whenever you decide to test your Rx code you have not one but two excellent choices - RxTest and RxBlocking. In this blog post I’ll go over the RxBlocking API and explain shortly how does the libary work. In Part 2 I’ll go over a bunch of real-life examples from open source I’ve written. Testing with RxTest pod RxTest to install it to your test suite from https://github.com/ReactiveX/RxSwift/tree/master/RxTest I’ve already written in the past about RxTest and few people have thanked me personally for shading some light on its usage, so if you’re interested head to the original article and read through: Testing your RxSwift code, part1.

observeOn vs. subscribeOn

Cross-thread subscriptions is a question that seems to pop up again and again on the RxSwift Slack channel. The explanation is very simple so I thought it was a good idea to put it in a blog post so whenever needed I can link to it instead of typing everything again and again. Observable subscriptions The terminology in regard to subscribing and observing is imho a bit messy so let’s first take this out of the way (do not skip this section!

Introducing RxAnimated

RxCocoa is super powerful for UI bindings - you can use bind(to:) to bind pretty much any kind of observable to a UI Control of your choice. You can bind a String to a UILabel, UIImage to a UIImageView, or an array of objects to UITableView or UICollectionView. Now, for table and collection view bindings there is a special library to allow you to bind a list of objects called RxDataSources and besides all the other goodness the library can add animations to your bindings.

Custom property bindings with RxSwift

Recently, in one of the few meetups I’ve been in person to, someone told me the didn’t try RxSwift because somebody told them that RxSwift doesn’t support custom views. While I’m still baffled what that original person meant, I thought the best way to disagree is to write a short tutorial to prove them wrong. What are custom property sinks? When you use RxCocoa bindings you can easily bind the values an observable emits to some view on screen like so:

Raffling my ticket to NSSpain 2017

This year is the 5th edition of NSSpain - the only international iOS/macOS conference in Spain and one of the best in the world I’ve been to. There are many reasons why I think NSSpain is the right way to do a conference, including but not limited to - single track, remote location, and best-in-business speakers… (And that’s why last year I sponsored a student-ticket to NSSpain.) Speakers receive not only free entry to the full conference and free accomodation, but also tons of love from the organizers.

First update to the RxSwift book with version 1.1

This is a short update about the first update to our RxSwift book. First of all, we’d like to thank all of you who posted to our book errata forum! (and if you haven’t hit the forums yet, check ‘em out - it’s the best place to report typos, bugs, and more: https://forums.raywenderlich.com/c/books/rxswift ). I’ve worked with the raywenderlich.com team on a number of books and I must say the RxSwift book has had, so far, the most enthusiastic feedback - we’ve been drowned in questions, thank you messages, and typo/bugs reports.

combineLatest beyond the basics

In the last couple of weeks I got to talk to few people who were either still struggling to understand what exactly does combineLatest do or didn’t know about a more recent power feature. So here it is … a post about combineLatest! What does the combineLatest operator do? combineLatest is super useful and it was the first thing in RxSwift that really made see how powerful Rx is and showed me what kind of problems can be easily solved with RxSwift.