Post

Replies

Boosts

Views

Activity

NSScrollView scrolling hitch
When scrolling a basic NSScrollView there seems to be a sudden jump after each flick. Scrolling does not appear smooth and is disorientating. A scroll jump seems to happen directly after letting go of a scroll flick using a trackpad/mouse. Right at that moment the scroll turns into a momentum scroll, slowly decreasing the speed. But the first frame after the gesture the content jumps forward, more than what is expected. Observations: Counterintuitively, scrolling appears to be smoother when disabling NSScrollView.isCompatibleWithResponsiveScrolling. If disabled using a custom NSScrollView subclass there is no large jump anymore. Scrolling also appears to be smoother using a SwiftUI ScrollView. I assume that has the same behaviour as a disabled isCompatibleWithResponsiveScrolling Ironically a WKWebView scrolls much smoother. No sudden jump is observable. It also seems to scroll with faster acceleration, but the individual frames do appear smoother. Why is this better than a native NSScrollView? Elastic scrolling at the bounds of the scroll view also appears much smoother for WKWebViews. When pulling to refresh there is a jump for NSScrollView/SwiftUI, but not for WKWebView. When using an NSScrollView with isCompatibleWithResponsiveScrolling disabled, scrolling appears just as smooth as WKWebView on macOS 13 Ventura and below. On macOS 14 Sonoma scrolling behaviour is suddenly different. Please see a sample project with 4 different scroll views side by side: https://github.com/floorish/ScrollTest Screen recordings show the sudden jumps when scrolling and when elastic scrolling. Tested on Intel & Arm Macs, macOS 11 Big Sur through 15 Sequoia, built with Xcode 16. Should isCompatibleWithResponsiveScrolling be disabled on Sonoma+? Are there any drawbacks? There is also no overdraw anymore since Monterey, as described in https://developer.apple.com/library/archive/releasenotes/AppKit/RN-AppKitOlderNotes/#10_9Scrolling Even with responsive scrolling disabled, why is WKWebView scrolling much smoother than NSScrollView?
1
0
61
15h
Application terminates on sleep even if windows are not closed
I've received some reports from users of my macOS app that the application quits when putting their Mac to sleep after hiding all windows. The NSApplicationDelegate implements applicationShouldTerminateAfterLastWindowClosed and returns true. However this method is called even though there are still windows open. Unfortunately I'm not able to reproduce the issue, but here are the steps to reproduce according to the user: Open app (single NSWindow visible) Press Command-H to hide the single window Put Mac to sleep The app is terminated when the Mac wakes. These steps have been confirmed by a user in Safe Mode, so I expect no interference of other applications (macOS 15.1.1). When this happens the application logs show that applicationShouldTerminateAfterLastWindowClosed is called when the Mac goes to sleep. But the main NSWindow is still open (yet hidden). The close() method on NSWindow is not called before applicationShouldTerminateAfterLastWindowClosed. Order of events: NSApplicationDelegate.applicationWillHide NSApplicationDelegate.applicationWillResignActive [...] NSApplicationDelegate.applicationShouldTerminateAfterLastWindowClosed NSApplicationDelegate.applicationShouldTerminate NSApplicationDelegate.applicationWillTerminate NSWindow.close I assumed that applicationShouldTerminateAfterLastWindowClosed is only called after all windows are closed. Is that assumption incorrect? Does a user-hidden NSWindow count as a closed window? For me (and other users) the API works as expected and the app stays running when the app is hidden as the Mac sleeps. applicationShouldTerminateAfterLastWindowClosed is not called until all windows are actually closed.
1
1
192
Dec ’24
IAP pricing doesn't update
I’ve been trying to update the pricing tier of one of my IAPs, but when checking the Mac App Store pages and StoreKit API (production, not Sandbox) it is still the old pricing tier after 7 days. I changed the pricing tier on May 16th, then again on May 18th because I didn't see any changes. Still no changes visible as of May 23th. Should I confirm pricing changes anywhere else in App Store Connect, or should just clicking 'Save' on the IAP page be sufficient? I assume pricing changes should be updated relatively quickly (some delay due to caching is expected), so waiting 7 days is a bit much. FB10022965 (Edit: looks like the automatic FB link here is incorrect and doesn't support 8 digits...)
2
1
1k
May ’22