Skip to content

Instantly share code, notes, and snippets.

View amelnychuck's full-sized avatar

Alex Melnychuck amelnychuck

View GitHub Profile
@amelnychuck
amelnychuck / FakeSettingsView.swift
Last active August 5, 2021 11:06
The goal of this 15min project is to showcase just how easy it is to fake an iOS settings screen. No photoshop text errors, no inconsistencies to reconcile–just a really convincing fake settings screen : )
//
// FakeSettingsView.swift
// FakeSettings
//
// Created by Alex Melnychuck on 8/26/20.
//
// The goal of this 15min project is to showcase just how easy it is to
// fake an iOS settings screen. No photoshop text errors, no
// inconsistencies to reconcile–just a really convincing fake
@amelnychuck
amelnychuck / ExampleTabbedView.swift
Last active December 6, 2020 22:30
Example SwiftUI TabbedView Implementation (Xcode Beta 3)
import SwiftUI
struct ExampleTabbedView : View {
@State private var selection = 1
var body: some View {
TabbedView(selection: $selection) {
Text("Tab 1")
.tabItem({
@amelnychuck
amelnychuck / TabBarViewController
Created July 27, 2017 23:23
Example of why we need closures to replace the last instances of #selectors in Cocoa Touch
import UIKit
class TabBarViewController: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()
}
// MARK: Keyboard Commands
@amelnychuck
amelnychuck / AppDelegate.swift
Created May 27, 2017 15:51
UIDebuggingInformationOverlay
// ...
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Do not include in App Store builds
// Tap status bar with two fingers to toggle overlay visibility
let overlayClass = NSClassFromString("UIDebuggingInformationOverlay") as? UIWindow.Type
_ = overlayClass?.perform(NSSelectorFromString("prepareDebuggingOverlay"))
}
// ...