Skip to content
Griffin Michalak edited this page May 24, 2023 · 2 revisions
  • The main view is ContentView, which is a NavigationView containing a ZStack with a MapView as the background and additional UI elements overlaid on top.
  • The MapView is a UIViewRepresentable that integrates the MKMapView from MapKit into SwiftUI. It displays the user's location, annotations for the locations, and handles the selection of a location when the user taps on an annotation.
  • The ContentView also includes a search bar implemented as a separate private var searchBar view. It consists of an HStack with an image, a text field for search input, and a clear button. It allows the user to filter the displayed locations based on the search text.
  • Tapping on a location annotation on the map opens a LocationDetailView that shows detailed information about the selected location. It includes the location's name, tags, description, website link, and address. The user can also mark the location as a favorite or dismiss the detail view.
  • The app has a settings screen implemented as SettingsView. It uses a Form to display different sections, such as theme selection, tag settings, and favorite management. Tapping on the "Manage Tags" and "Manage Favorites" buttons in the respective sections opens separate screens (TagSettingsView and FavoriteSettingsView) where the user can perform tag and favorite management actions.
  • The app uses various state variables, such as selectedLocation, isCenteredOnUserLocation, searchText, and theme, to track the app's state and update the UI accordingly.
Clone this wiki locally