Finished the tooltip for the notes app 🚀
It took longer than expected, but that's because I had trouble with the tooltip being displayed below other elements.
I also had a problem with the scale and opacity animation. It seems like views will by default animate from the center of the window in a `ZStack`. Not literally be positioned at the center, but the initial position of the tooltip was skewed towards the center point of the window.
It turns out that I should not conditionally remove the wrapper, but instead keep it always (the wrapper is used to calculate where tooltips should be relative to the button). Otherwise it will not have time to calculate the coordinates for the tooltip, which means it will fly in from center and then to its final position. Now I'm just keeping the position wrapper always, and then conditionally rendering the tooltips.
#dev #macOS #SwiftUI #AppKit
📝 7c823a83…