Post

Replies

Boosts

Views

Activity

Comment on Map in SwiftUI just wont follows users heading when first shown
Just a quick, minor correction... per documentation, the .task body gets executed before the view appears. Also, an idea came to me that the map's position is first set to .automatic in my suggestion. Replacing it with .userLocation later correctly follows the user's heading. The .task view modifier is just one way to achieve this replacement. Just as long as the .userLocation isn't the first MapCameraPosition assigned to Map.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’24
Comment on Map in SwiftUI just wont follows users heading when first shown
Well, thank goodness! No need for hidden maps at all. That's definitely a hard way to achieve what you want. Good luck!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’25
Comment on Map in SwiftUI just wont follows users heading when first shown
Just a quick, minor correction... per documentation, the .task body gets executed before the view appears. Also, an idea came to me that the map's position is first set to .automatic in my suggestion. Replacing it with .userLocation later correctly follows the user's heading. The .task view modifier is just one way to achieve this replacement. Just as long as the .userLocation isn't the first MapCameraPosition assigned to Map.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’24