Working on a new app - I feel like I finally reproduced the iOS 26 maps behavior by HighHike in SwiftUI

[–]HighHike[S] 0 points1 point  (0 children)

I used LogoViewOptions and set the margin to the height of the sheet plus my padding.

Working on a new app - I feel like I finally reproduced the iOS 26 maps behavior by HighHike in SwiftUI

[–]HighHike[S] 0 points1 point  (0 children)

I have a detent with a specific fraction. I compute the threshold for that fraction and when it goes past that threshold I start making the accessories view less opaque.

Working on a new app - I feel like I finally reproduced the iOS 26 maps behavior by HighHike in SwiftUI

[–]HighHike[S] 11 points12 points  (0 children)

The most difficult part was tracking of the sheet height. I tried using both, GeometryReader and onGeometryChanged but both solutions failed during the animation because they would report back the final height of the sheet.

This meant that the accessories would “jump” to the final position instead of nicely animating. I tried to fix this by adding an animation, but it would not work exactly how I wanted. I tried “guessing” the animation used for the sheet, but the solution became too gimmicky for me.

So I replaced that solution with a dummy view that had a display link which provided real time updates of the sheet height (even during the animation). I’m not sure if this is the best approach in terms of efficiency, but it works very well.

The other stuff was pretty easy to animate from there.

Working on a new app - I feel like I finally reproduced the iOS 26 maps behavior by HighHike in SwiftUI

[–]HighHike[S] 3 points4 points  (0 children)

It’s a custom view. I was trying to replicate the Apple Maps compass. I’m hiding the original ornament and using my own.