Skip to content

Instantly share code, notes, and snippets.

@nkalvi
nkalvi / NavigationSplitViewExample.swift
Last active September 21, 2023 14:14 — forked from Dimillian/NavigationSplitViewExample.swift
An example on how to use the new NavigationSplitView on iPad with global navigation - updated to work by following "Bringing robust navigation structure to your SwiftUI app"
// 2022-08-03: updated to work by following "Bringing robust navigation structure to your SwiftUI app"
// https://developer.apple.com/documentation/swiftui/bringing_robust_navigation_structure_to_your_swiftui_app
// Tested with Xcode Version 14.0 beta 4 (iOS 16.0 beta 4)
import SwiftUI
import Combine
@main
struct SplitNav_2022_08_02App: App {
@StateObject var navigationModel = NavigationModel(sidebarDestination: .subreddit(subreddit: .games))
@nkalvi
nkalvi / 0_reuse_code.js
Created November 18, 2016 05:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console