100 Days of SwiftUI Day 90

100 Days of SwiftUI – Day 90

We’ve arrived day 90 of the 100 Days of SwiftUI! Yesterday, we learned about using and watching a timer and coloring views as we swipe. Today, we’re finishing the Flashzilla app by adding the functionality to add and remove cards, vibrations and fixing the final bugs. Let’s dive in!

Adding and deleting cards

Everything we’ve worked on so far has used a fixed set of sample cards, but of course this app only becomes useful if users can actually customize the list of cards they see. This means adding a new view that lists all existing cards and lets the user add a new one, which is all stuff you’ve seen before. However, there’s an interesting catch this time that will require something new to fix, so it’s worth working through this.

Hacking with Swift, Paul Hudson (@twostraws)

As always, Paul’s got us covered.

Making iPhones vibrate with UINotificationFeedbackGenerator in SwiftUI

iOS comes with a number of options for generating haptic feedback, and they are all available for us to use in SwiftUI. In its simplest form, this is as simple as creating an instance of one of the subclasses of UIFeedbackGenerator then triggering it when you’re ready, but for more precise control over feedback you should first call its prepare() method to give the Taptic Engine chance to warm up.

Hacking with Swift, Paul Hudson (@twostraws)

Since iOS features many options when it comes to using haptics, it’s up to us as the developer to chose the most fitting implementation for our apps.

Wrap up

And that’s it for day 90 and the Flashzilla app! We’ve yet another SwiftUI project under our belt and we can really see the finish line coming closer now. We’re not quite there yet though, so keep your focus and we’re going to move on tomorrow!


Hi! My name is Darryl and this is my personal blog where I write about my journey as I learn programming! You'll also find articles about other things that interest me including games, tech and anime.

Post navigation

Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

100 Days of SwiftUI – Day 92

100 Days of SwiftUI – Day 39 – Moonshot

100 Days of SwiftUI – Day 57

100 Days of SwiftUI – Day 29 – Word Scramble