Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonnickel/fb13322408-swiftuimacosscrollviewedgewindowbar
https://github.com/simonnickel/fb13322408-swiftuimacosscrollviewedgewindowbar
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/simonnickel/fb13322408-swiftuimacosscrollviewedgewindowbar
- Owner: simonnickel
- Created: 2023-11-01T10:11:07.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-01T14:10:56.000Z (about 1 year ago)
- Last Synced: 2024-12-16T16:06:20.298Z (25 days ago)
- Language: Swift
- Size: 431 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FB13322408 - SwiftUI macOS: ScrollView should have the same scroll edge behaviour as List
## Scenario
An app has a SplitView with sidebar and content. The content is either a List or a ScrollView.
On macOS:
When the List is visible the windowBar has the same color as the List background, only on scroll the bar appears.
When the ScrollView is visible, the bar is always visible.![macOS-ScrollView](./macOS-ScrollView.png)
![macOS-List](./macOS-List.png)On iPad:
The navigationBar has the same color as the background, no matter if List or ScrollView.![iPadOS-ScrollView](./iPadOS-ScrollView.png)
![iPadOS-List](./iPadOS-List.png)## The Issue
The behaviour on iPadOS is the same for List and ScrollView.
The behaviour on macOS is different for List and ScrollView and there is no way to adjust the ScrollView to have the same behaviour.## Suggestion
There should be an option to influence the scroll edge behaviour of ScrollView and List
## Example Code
The example contains a SplitView with a List and a ScrollView. Running it on macOS and iPadOS shows the different behaviour.
## Workaround
Force visible navigation bar
iOS: .toolbarBackground(.visible, for: .automatic)
macOS: .scrollContentBackground(.hidden)## Tested on
- macOS 14.0
- iPadOS 17.0