Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
  1. Open the project in Xcode.
  2. Click on the Main.storyboard file to open it.
  3. Select the View Controller that contains the sidebar.
  4. In the Attributes Inspector, find the "Show Sidebar" option and check the box.
  5. Build and run the application to verify that the sidebar is automatically opened upon launching the application.
  6. If the sidebar does not open by default, go to the AppDelegate.swift file in the project.
  7. Find the "applicationDidFinishLaunching(_:)” method.
  8. Add the line of code that opens the sidebar: splitViewController?.show(.sidebar, sender: nil)
  9. Build and run the application to verify that the sidebar now opens by default upon launching the application.