100-days-of-swiftui-and-com.../day-082
CypherPoet de8ee275cb Complete Day 82 2020-01-10 07:17:29 -06:00
..
README.md Complete Day 82 2020-01-10 07:17:29 -06:00

README.md

Day 82: Project 16: QRConnections (Part Four)

Follow along at https://www.hackingwithswift.com/100/swiftui/82.


📒 Field Notes

This day covers Part Four of Project 16 in the 100 Days of SwiftUI Challenge. (Project 16 files can be found in the directory for Part One.)

It focuses on several specific topics:

  • Building our tab bar
  • Sharing data across tabs using @EnvironmentObject
  • Dynamically filtering a SwiftUI List

Building our tab bar

From the project description:

This app is going to display four SwiftUI views inside a tab bar: one to show everyone that you met, one to show people you have contacted, another to show people you havent contacted, and a final one showing your information for others to scan.

Given that I tend to tabs as organizing application categories, I took a slightly different approach by only making two: A tab for our collected contacts and a tab for the user's own QR Code.

Filtering, then, can be facilitated by a segmented picker: