Skip to content

Example of how to use the new iOS 14 sidebar UI element.

License

Notifications You must be signed in to change notification settings

marcosatanaka/sidebar-ios14

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sidebar iOS 14

This is a sample project demonstrating how to implement the new Sidebar UI on an iPad app using Swift. It tries to mimic the UI of the new Music app on iPadOS 14.0:

Preview.png

It contains just the code required to create the UI, and it was based on the Apple's sample project Implementing Modern Collection Views.

Multiplatform with SwiftUI

Check out this repository to see how to do this for a multiplatform app (iOS, iPadOS, macOS) built with SwiftUI.

TO-DO

  • Maintain the selection when contracting/expanding a section.
  • Restore the state of a view controller when changing between regular and compact mode.
  • Revert to tab bar based navigation on compact layouts, and on the iPhone.

Known bugs

Starting the app in compact mode, and then changing it to regular mode causes the following error:

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unexpected view controller change in Secondary column for expanding <UISplitViewController: 0x10550a630>'

I have a question for this on the Apple Developer Forums, I'm not sure if this is a bug in the API, or if I'm using it incorrectly.

Documentation links

WWDC20 videos

About

Example of how to use the new iOS 14 sidebar UI element.

Topics

Resources

License

Stars

Watchers

Forks

Languages