Skip to content

Instantly share code, notes, and snippets.

import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var rootVC: UINavigationController? = nil
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
window = UIWindow(frame: UIScreen.main.bounds)
@robmathers
robmathers / ImageColourMask.swift
Last active July 13, 2018 22:03 — forked from omz/gist:1102091
Swift UIImage extension to create arbitrarily-colored icons from a black-with-alpha master image
//
// ImageColourMask.swift
//
// Created by Rob Mathers on 2018-07-13.
// Swift version of https://gist.github.com/omz/1102091/e03982f00ecc34be6c40aedcb0932ed374992741
// Original Objective-C version by Marco Arment and Ole Zorn
//
// Usage example:
// let maskedImage = UIImage(named: "test")?.maskedImage(color: UIColor.blue)