“TacoPOP” – Protocols and Extensions

Hello! Today I have been writing another app called “TacoPOP” with a bunch of protocols and extensions, as I have introduced yesterday. To spice it up, I added a little animation when a Taco image is tapped.

Although this app is far from complete, I believe it has served its purpose of teaching me about protocols and extensions, which are handy tools when you want to modify existing objects that directly affect the app elements. In today’s case, UICollectionViewCell has been extended to perform a custom animation called “shake()”. Also, UICollectionView has been extended to perform a function called “shuffle()” to have its prototype cells exchange with another random cell, so the tacos would randomized every time the app is launched. Today is a traditional Chinese holiday called Dragon Boat Festival, which inspired my next app which will be related to Chinese Zodiac Signs!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s