Observe UIButton Events Using Combine in Swift 5

Create and leverage your own reusable Publisher

Zafar Ivaev
Better Programming
Published in
3 min readJul 15, 2021

--

Photo by Maxim Hopman on Unsplash

In this tutorial, we will learn how to create our own Publisher in Combine, which you can easily reuse in your applications.

Our plan is to make the observation for UIButton taps as simple as possible. This is the functionality we will have by the end of this article:

--

--

Senior iOS Engineer. I write about features of Swift and iOS development practices.