"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!