我是Swift和编码的新手,并且正在努力从YouTube的教程中制作一个简单的Web浏览器应用程序,并且我遇到了一些错误。我可以做出任何更改吗?
import UIKit
class ViewController: UIViewController {
@IBAction func settings(_ sender: Any) {
}
@IBOutlet weak var mysettings: UIButton!
@IBOutlet weak var myWebviewer: UIWebView!
}
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
mywebviewer.loadrequest(URLRequest(url: URL(String:"https://www.google.com")!))
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
屏幕截图
尝试移动关闭括号}
从第16行到第31行。
当前,您的ViewController
类具有从第11行到16的范围,而它应包含屏幕截图上可见的所有方法
frist remove curley支架,在iBoutlet之后定位并添加视图控制器类的最后一行,因为这是一个主类括号