Skip to content

Instantly share code, notes, and snippets.

@kristjanmik
Created September 15, 2014 16:24
Show Gist options
  • Save kristjanmik/ba5a8d1eab9a5cbc0c87 to your computer and use it in GitHub Desktop.
Save kristjanmik/ba5a8d1eab9a5cbc0c87 to your computer and use it in GitHub Desktop.
var filePath = NSBundle.mainBundle().pathForResource("railway", ofType: "gif")
var gif = NSData(contentsOfFile: filePath)
var webViewBG = UIWebView(frame: self.view.frame)
webViewBG.loadData(gif, MIMEType: "image/gif", textEncodingName: nil, baseURL: nil)
webViewBG.userInteractionEnabled = false;
self.view.addSubview(webViewBG)
var filter = UIView()
filter.frame = self.view.frame
filter.backgroundColor = UIColor.blackColor()
filter.alpha = 0.5
self.view.addSubview(filter)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment