I have strange problem with AutoLayout in Swift 2.0
self.webView = WKWebView()
self.view.addSubview(self.webView!)
var viewBindingsDict: NSMutableDictionary = N
You should change your viewBindigsDict
to
var viewBindingsDict = [String: AnyObject]()
viewBindingsDict["webView"] = webView
as suggested in the comments, and also in the format options, you cannot use 0, instead:
view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|[webView]|", options: NSLayoutFormatOptions(rawValue: 0), metrics: nil, views: viewBindingsDict))
or more simplier as @MartinR suggested:
view.addConstraints(NSLayoutConstraint.constraintsWithVisualFormat("H:|[webView]|", options: [], metrics: nil, views: viewBindingsDict))