Created
December 22, 2014 00:48
-
-
Save mxcl/88d4f2ef85a48ec81996 to your computer and use it in GitHub Desktop.
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 | |
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