Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Coding

Felipe Ricieri felipericieri

:octocat:
Coding
View GitHub Profile
@felipericieri
felipericieri / AdditionalWindowToHideSensitiveData.swift
Last active Jul 11, 2020
Using Additional Window to hide sensitive data
View AdditionalWindowToHideSensitiveData.swift
@UIApplicationMain
class AppDelegate: UIApplicationDelegate {
var window: UIWindow?
private lazy var backgroundWindow: UIWindow = {
let screen = UIScreen.main
let window = UIWindow(frame: screen.bounds)
window.screen = screen
window.rootViewController = BlockViewController()
@felipericieri
felipericieri / ChangeWindowRootViewController.swift
Last active Jan 18, 2020
Change Window Root View Controller
View ChangeWindowRootViewController.swift
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
// MARK: - Handling Application Background State
func applicationDidEnterBackground(_ application: UIApplication) {
@felipericieri
felipericieri / AddBlockViewAsWindowSubview.swift
Last active Jan 18, 2020
Adds a Block View as Window Subview
View AddBlockViewAsWindowSubview.swift
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
// MARK: - Handling Application Background State
func applicationDidEnterBackground(_ application: UIApplication) {
@felipericieri
felipericieri / AddBlockViewToWindowRootViewControllerView.swift
Last active Jan 18, 2020
Adds a Block View to Window Root View Controller
View AddBlockViewToWindowRootViewControllerView.swift
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
// MARK: - Handling Application Background State
func applicationDidEnterBackground(_ application: UIApplication) {
@felipericieri
felipericieri / ScrollingController.swift
Created Aug 6, 2019
A `UIViewController` with a `UIScrollView` embeded that acts like a View Container
View ScrollingController.swift
import UIKit
/// Objects conforming with `ScrollingAdditionalViewController` need to share its preferred height in stack
public protocol ScrollingAdditionalViewController where Self: UIViewController {
var preferredHeightInStack: CGFloat { get }
}
/// `NestedScrollViewController` represents the nested `UIScrollView` in `ScrollingController`
public protocol NestedScrollViewController where Self: UIViewController {
var view: UIView! { get }