Having assigned the annotations last time around, this time we use them to react to the user tapping on them. In Lesson 11 of Module 6 from the CodeWithChris iOS Foundations course, we react to the user tapping on the annotation to display details of the business in question. This […]
UIKit
I’ve seen a little about “delegates” when viewing code before, but it didn’t make sense. Lesson 10 of Module 6 from CodeWithChris takes us into UIKit, which is required for the MapView elements. I had to keep rewinding Chris’ video tutorial, but I don’t think much of it sank in […]
In this lesson, we learned to use the MapView, from UIKit, to show the business landmarks (from the Yelp! data) on the map. The key components of the code to do this are as follows: Method makeUIView is required to ensure the struct conforms to the UIViewRepresentable protocol. It effectively […]
Wow, what a lot of work to display HTML in an app! Today’s lesson covered attributed Strings (a string that has associated attributes, such as styles, HTML, etc). Apparently SwiftUI can’t do that yet, so we’re using UIKit to achieve it. Two methods are required, and the UIViewRepresentable protocol is […]