MobileEntityLogo.png

Hi.

Welcome to the best online resource for IOS & Android tutorials.

Leveraging protocols to clean up your classes.

Leveraging protocols to clean up your classes.

Here is what your average collection view class looks like

usual class implementation

Now this is how your class should look like after this tutorial.

This is how class looks after tutorial

As you see we combined UICollectionViewDelegate, and UICollectionViewDataSource into one protocol making your class protocol list much shorter. Keep in mind there are some UIKit protocols that don’t let you do this such as UIViewController. Combining protocols is simple. Just create a protocol, and extend from the other protocols you want to use.

protocol implementation

As you see with one line of code we can clean up those long lists of protocols into one simple protocol that has all of the protocols you need. You can also add your own required functions in these protocols if you wish.

An introduction to SwiftUI Lazy Stacks and why they are important

An introduction to SwiftUI Lazy Stacks and why they are important

An introduction to creating Swift Command Line Tools

An introduction to creating Swift Command Line Tools

0