Single Webview project for xcode in swift

An xcode project that with single webview(UIWebView) that opens external URL, for hybrid web app debug or test use.

  • Swift
  • Constrains ready. Fullscreen view with hidden status bar.
  • The default URL has been set to ““.
  • In Info.plist, the Allow Arbitrary Loads Key has been set to YES, so that it supports http:// links. If you want to support secure https:// links only, please set it to NO.

Customize the URL

Please go to ViewController.swift and change the URL string to your expected URL.

        let url = NSURL(string: "") // Customize your URL here

Turn On Status Bar

By default, the Status Bar is turned off. you will see the web in fullscreen view. If you want to show the status bar on the webciew. Please go to ViewController.swift, and change the return true to return false on follow section. As the status bar will overlap your webview, you might want to change the constant value for the Trailing Space To: Superview in xcode to prevent it effects the webview visual style in some cases.

        override func prefersStatusBarHidden() -> Bool {
                return true // Change 'true' to 'false' here


View Github