|
Trying to update the mapview of the Project 14 of 100daysOfSwiftUI to show my current location, the problem i can´t zoom in move around i have this code i add
an this is my swiftUI view
i just want to center my mapview on my current location when i press the laction button |
|
@misaellandero Since call to this method I except this solution would work for you: Step 1: add this line
Step 2: Set this property to
Step 3: Use this property to avoid unnecessary update for
That's it, this is how I resloved my issue, hope this helps. If you are curious here is the link of my project, Complete Challenge |
TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.