This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ScreenRecorder.swift | |
// Sohil R. Memon | |
// | |
// Created by Sohil R. Memon | |
// Copyright © 2018 Sohil R. Memon. All rights reserved. | |
// | |
import Foundation | |
import ReplayKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Dispatch | |
private var throttleWorkItems = [AnyHashable: DispatchWorkItem]() | |
private var lastDebounceCallTimes = [AnyHashable: DispatchTime]() | |
private let nilContext: AnyHashable = arc4random() | |
public extension DispatchQueue { | |
/** | |
- parameters: | |
- deadline: The timespan to delay a closure execution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UIView { | |
open override func awakeAfter(using aDecoder: NSCoder) -> Any? { | |
let viewType = type(of: self) | |
let nibName = String(describing: Mirror(reflecting: self).subjectType) | |
let bundle = Bundle.main //Bundle(for: viewType) | |
//Prevents infinite loop from loadNibNamed internally-calling awakeAfterUsingCoder. Is false when called from storyboard, true when |