100 Days of SwiftUI Day 83

100 Days of SwiftUI – Day 83

We’ve arrived at day 83 of the 100 Days of SwiftUI! Yesterday, we focussed on building a tab bar and sharing data across tabs. Today, we’re learning how to generate and scan a QR code. Let’s take a look!

Generating and scaling up a QR code

We’ve worked with Core Image before, so we know how powerful it is when working with images. The same framework can also be used to generate QR codes. The catch is that the image it generates is very small, so for the sake of usability, we need to scale it up as well.

Scanning QR codes with SwiftUI

Scanning a QR code – or indeed any kind of visible code such as barcodes – can be done by Apple’s AVFoundation library. This doesn’t integrate into SwiftUI quite well just yet, but Paul’s got us covered.

Wrap up

And that’s it for day 83! We’ll move on to the final part of our project tomorrow, as we’ll go back to UserDefaults and pushing notifications to our users’ lockscreen. Stay tuned for that!

Darryl

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.

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

100 Days of SwiftUI – Day 47

100 Days of SwiftUI – Day 16 – First Project

100 Days of SwiftUI – Day 15 – Consolidation

100 Days of SwiftUI – Day 63