Friday, July 22, 2022 [Tweets] [Favorites]

Weathergraph 1.0.107

Tomas Kafka:

Interactive chart, just in time for summer trips! Need to know the exact conditions for a given hour? Long press the chart to show all the data, or press and slide your finger over the chart to “scrub” through the forecast.

Between this and the improved legend introduced in another recent update, it’s much easier to get a feel for what different heights on the graph mean.

Previously:

2 Comments

Great app. I believe I first heard about it here, acquired a license shortly thereafter and never regretted it :-)

Corentin

Hi Michael (and everyone else), just a PSA - the tooltip accidentally broke chart scrolling on iOS 15, and the fix is now in the expedited App Store review.

The story behind this is that I tried really hard to do the functionality (scrolling as usual, but press, hold and drag to scrub the chart for details) in pure SwiftUI, and as the solution (combination of LongPressGesture and DragGesture) worked fine on all my devices (upgraded to iOS 16) beta devices, I pushed it into the App Store. And only then I found out that the same code totally blocked the scrollview scrolling in iOS 15.

In the end I relented, and used the excellent Introspect (https://github.com/siteline/SwiftUI-Introspect) library to reach the underlying UIScrollView, and disable scrolling when dragging starts.

Surprisingly, I also tried using UIScrollView directly via UIViewRepresentable (see https://gist.github.com/mishimay/b823280bd91d16474362376029321752), and this made scrolling really choppy, as the chart's wrapping UIScrollView didn't coordinate with app's wrapping SwiftUI ScrollView, and both consumed their own axis of a same gesture. Clearly SwiftUI is doing some behind-the-scenes coordination.

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment