bobleesj / Blog_Delegate_Data_Source

Learn how to communicate between view controllers with the delegate and data source pattern in Swift.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The Complete Understanding of Swift Delegate and Data Source

alt text

Motivation

I’ve noticed not only the delegate/data source pattern exists everywhere within the iOS ecosystem, but also most people simply copy and paste without knowing the behind implementation. 

If you’ve wondered how UITableViewDataSource works, you might have come to the right place.

Introduction 

First, the delegate design pattern is used to pass data or communicate between classes or structs. That’s it. The word “delegate” may come across confusing. I will try to use analogy throughout the tutorial.  Your job is to pass data from FirstVC to SecondVC. Let us use the delegate pattern. First, you need to create a protocol that has a required function with a String parameter.


Read More: https://medium.com/ios-geek-community/the-complete-understanding-of-swift-delegate-and-data-source-9c91ecd7f1

Facebook Page: https://facebook.com/bobthedeveloper

About

Learn how to communicate between view controllers with the delegate and data source pattern in Swift.


Languages

Language:Swift 100.0%