Skip to content

Instantly share code, notes, and snippets.

Working from home

Ahmed Hamdy dimohamdy

Working from home
View GitHub Profile
dimohamdy / MigrateDefaults.swift
Created Aug 7, 2020 — forked from dougdiego/MigrateDefaults.swift
Migrate NSUserDefaults to App Groups - Swift
View MigrateDefaults.swift
func migrateUserDefaultsToAppGroups() {
// User Defaults - Old
let userDefaults = NSUserDefaults.standardUserDefaults()
// App Groups Default - New
let groupDefaults = NSUserDefaults(suiteName: "group.myGroup")
// Key to track if we migrated
let didMigrateToAppGroups = "DidMigrateToAppGroups"
dimohamdy / CoordinatorExtended.swift
Created Nov 13, 2019 — forked from bocato/CoordinatorExtended.swift
An extended implementation of the Coordinator pattern.
View CoordinatorExtended.swift
import UIKit
/// An enum that defines an output to be passed on from
/// a child to it's parents over the responders Chain
public protocol CoordinatorOutput {}
/// An enum that defines an input to be passed on from
/// the parent to it's childs
public protocol CoordinatorInput {}