For example, how can I make MapView, which is a 'struct' type conform to CLLocationManagerDelegate which requires a 'class' type for its protocol?
Code Block struct MapView: UIViewRepresentable, CLLocationManagerDelegate { var coordinate: CLLocationCoordinate2D func makeUIView(context: Context) -> MKMapView { MKMapView(frame: .zero) } func updateUIView(_ uiView: MKMapView, context: Context) { let span = MKCoordinateSpan(latitudeDelta: 0.0019, longitudeDelta: 0.0019) let region = MKCoordinateRegion(center: coordinate, span: span) uiView.setRegion(region, animated: true) uiView.mapType = .hybridFlyover } }