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
class BackgroundTask { | |
private let application: UIApplication | |
private var identifier = UIBackgroundTaskInvalid | |
init(application: UIApplication) { | |
self.application = application | |
} | |
class func run(application: UIApplication, handler: (BackgroundTask) -> ()) { | |
// NOTE: The handler must call end() when it is done |
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
public protocol StoryboardInstantiatable { | |
static var storyboardName: String { get } | |
static var viewControllerIdentifier: String? { get } | |
static var bundle: Bundle? { get } | |
} | |
public extension StoryboardInstantiatable where Self: UIViewController { | |
public static var storyboardName: String { | |
return String(describing: self) | |
} |