- class ViewController: UIViewController, UIWebViewDelegate {
- override func viewDidLoad() {
- super.viewDidLoad()
- // Do any additional setup after loading the view, typically from a nib.
- let myWebView:UIWebView = UIWebView(frame: CGRect(x:0, y:0, width: UIScreen.main.bounds.width, height:UIScreen.main.bounds.height))
- self.view.addSubview(myWebView)
- myWebView.delegate = self
- //1. Load web site into my web view
- let myURL = URL(string: "http://www.swiftdeveloperblog.com")
- let myURLRequest:URLRequest = URLRequest(url: myURL!)
- myWebView.loadRequest(myURLRequest)
- }
Saturday, 24 June 2017
Create UIWebView Programmatically and Load Webpage Using NSURL
Subscribe to:
Post Comments (Atom)
Remove bottom line in navigation bar
navigationController ?. navigationBar . setBackgroundImage ( UIImage (), for: . any , barMetrics: . default ) navigat...
-
--> Use this line for getting device name UIDevice.current.name ------------------------------------------------------------------...
-
For Label: labelname.attributedText = NSAttributedString(string: "text " , attributes: [NSUnderlineStyleAttribut...
-
// Reading data from Local Json file instead of Service urls using Alamofire in swift3 func getwordmeaningdata() { ...
No comments:
Post a Comment