Skip to content

Instantly share code, notes, and snippets.

@mclaughj
Created May 30, 2017 17:46
Show Gist options
  • Save mclaughj/5a6e00567680e58275fdb67396f92db2 to your computer and use it in GitHub Desktop.
Save mclaughj/5a6e00567680e58275fdb67396f92db2 to your computer and use it in GitHub Desktop.
Mimicking the Things.app 3.0 status bar tinting
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
var overlayWindow = UIWindow()
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
overlayWindow.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 20)
overlayWindow.windowLevel = UIWindowLevelStatusBar
overlayWindow.backgroundColor = UIColor(white: 1, alpha: 0.4)
overlayWindow.rootViewController = UIViewController()
overlayWindow.isHidden = false
return true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment