Skip to content

Instantly share code, notes, and snippets.

@mxcl
Created December 22, 2014 00:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mxcl/88d4f2ef85a48ec81996 to your computer and use it in GitHub Desktop.
Save mxcl/88d4f2ef85a48ec81996 to your computer and use it in GitHub Desktop.
import UIKit
class BlurryVC: UIViewController {
override func loadView() {
view = UIVisualEffectView(effect: UIBlurEffect(style: .Light))
}
}
class ViewController: UIViewController {
override func loadView() {
let label = UILabel()
label.text = "sldkjfhaskjdhfkjasdhfkjhasdkfjhasdkj fka dsfh askjdhf askjdhf kjashdf kjashdfkj hkajsdfh askjd"
label.numberOfLines = 0
label.textColor = UIColor.redColor()
label.font = UIFont.boldSystemFontOfSize(30)
view = label
}
override func viewDidAppear(animated: Bool) {
let dt = 2 * Int64(NSEC_PER_SEC)
let t = dispatch_time(DISPATCH_TIME_NOW, dt)
dispatch_after(t, dispatch_get_main_queue()) {
let vc = BlurryVC()
vc.modalPresentationStyle = .OverFullScreen
self.presentViewController(vc, animated: true, completion: nil)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment