Mac O’Clock
Published in

Mac O’Clock

MapView SwiftUI With AnnotationView and Coordinator

SwiftUI is very powerful for building an interactive UI at a fast pace. However, there are a couple of limitations still there such as some native API from UIKit like MKMapView from MapKit or search bar and other UIKit API. I will provide a tutorial for making a MapView in SwiftUI by using UIViewRepresentable as well as putting callback to the SwiftUI if we have clicked the annotation.

Some quick knowledge about several items below:

  1. UIViewRepresentable : A wrapper for a UIKit view that you use to integrate that view…

--

--

--

The best stories for Apple owners and enthusiasts

Recommended from Medium

Beginning an iOS Journey

Custom Drop Down Text Field in SWIFTUI

Can a Javascript developer make an SwiftUI app?

How to boost your app on App Store

Swift vs Objective-C- The comparison

Swift Vs React Native Vs Flutter(Dart). Which one to choose?

Convenience Init

[LeetCode] 1678. Goal Parser Interpretation (Swift)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Michael Abadi S.

Michael Abadi S.

iOS Engineer at Agoda, Bangkok

More from Medium

Working With Custom “xcconfigs” and Cocoapods

Every iOS developer should know these Xcode tricks

Change app icon dynamically

How to Write Images to Camera Roll in iOS

How to Write Images to Camera Roll in iOS