Skip to content

Demo: horizontally scrolling thumbnails at bottom, single detail view above. Mimics the Apple Photos app, using SwiftUI bindings.

Notifications You must be signed in to change notification settings

halmueller/ThumbnailScrollDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ThumbnailScrollDemo

Imitation of the Photos app browse mode. Horizontally scrolling thumbnails, with detail view above the scrollview. SwiftUI and Bindings exercise. Tested on macOS, iOS, visionOS.

Follows the concepts of https://developer.apple.com/tutorials/swiftui-concepts/driving-changes-in-your-ui-with-state-and-bindings, but this is a vertical layout, not a horizontal layout. Imagine a NavigationSplitViewController that’s laid out vertically instead of horizontally.

The thumbnail and detail views are quite primitive. They're meant as simple examples. This is a Bindings exercise, not a pretty UI exercise.

For the detail view: we have a detail wrapper that accepts a binding to an item (a notional City). The detail wrapper performs a lookup of the item binding ID, and shows a detail view that accepts an actual item/City).

macOS screenshot

iOS screenshot

About

Demo: horizontally scrolling thumbnails at bottom, single detail view above. Mimics the Apple Photos app, using SwiftUI bindings.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages