Skip to content

Instantly share code, notes, and snippets.

View jong9000's full-sized avatar
🖥️
Working from home

Jon Gentry jong9000

🖥️
Working from home
View GitHub Profile
@jong9000
jong9000 / String+Extensions.swift
Last active July 19, 2021 21:02
String Extensions
// String Extensions
// https://www.simpleswiftguide.com/get-character-from-string-using-its-index-in-swift/
extension StringProtocol {
subscript(offset: Int) -> Character {
self[index(startIndex, offsetBy: offset)]
}
}
@jong9000
jong9000 / SceneDelegate.swift
Last active May 20, 2021 21:40
Scene Delegate with Programmatic UINavigationController
import UIKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// 1. Create named variable for the window scene.
@jong9000
jong9000 / ViewController.swift
Created April 8, 2021 20:42
Basic example of creating iOS view and adding label with constraints programatically.
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func loadView() {
@jong9000
jong9000 / mac-shortcuts.md
Last active December 15, 2021 12:13
macOS collection of shortcuts and commands

Mac Keyboard Symbols

symbol name
command
option
control
shift
tab
↩︎ return