webview app

import UIKit class ViewController: UIViewController { @IBOutlet var WebView: UIWebView! override func viewDidLoad() { super.viewDidLoad() WebView.loadRequest(NSURLRequest(URL: NSURL (string: "http://www.domain.com/webapp")!)) } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() } override func prefersStatusBarHidden() -> Bool { return true; } func addSkipBackupAttributeToItemAtURL(filePath:String) -> Bool { let URL:NSURL = NSURL.fileURLWithPath(filePath) assert(NSFileManager.defaultManager().fileExistsAtPath(filePath), "File \(filePath) does not exist") var success: Bool do { try URL.setResourceValue(true, forKey:NSURLIsExcludedFromBackupKey) success = true } catch let error as NSError { success = false print("Error excluding \(URL.lastPathComponent) from backup \(error)"); } return success } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.