I'm very new to development in Swift and Xcode and would love some pointers. I just started looking at it today and thought I'd start out with creating an app for iPhone that simply acts as a webwrapper. Though, I've only dragged in a UIwebView
and written 4 lines of code that I found here on stackoverflow, it's already all going to hell.
Does anyone know what I'm doing wrong? I'm sure it's something simple.
I've only got experience with simple front-end for web as well as PHP and some Java so Swift looks somewhat weird to me.
The error I'm getting is "Thread 1: EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)".
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var webView: UIWebView!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
let url = NSURL(string: "http://www.mjuk.se/frånvaro")!
let request = NSURLRequest(url: url as URL)
webView.loadRequest(request as URLRequest)
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}