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.
Dec ’24