小编eli*_*o25的帖子

在swift中"无法识别的选择器发送到实例"

我不知道我做错了什么.我对编程也很陌生,所以我不擅长调试.这是一个测试应用程序,以便我可以看到与应用程序开发的快速联系.到目前为止,我有这个:

class ViewController: UIViewController, UITextViewDelegate {

    var textView: UITextView!

    init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) {
        super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
    }

    override func viewDidLoad() {
        super.viewDidLoad()

        var widthField = self.view.bounds.size.width - 10
        var heightField = self.view.bounds.size.height - 69 - 221
        var textFieldString: String! = ""
        //Set up text field
        self.textView = UITextView(frame: CGRectMake(5, 64, widthField, heightField))
        self.textView.backgroundColor = UIColor.redColor()
        self.view.addSubview(self.textView)
        //Set up the New button
        var newButtonString: String! = "New Note"
        var heightButton = 568 - heightField - 1000
        let …
Run Code Online (Sandbox Code Playgroud)

swift

27
推荐指数
6
解决办法
7万
查看次数

标签 统计

swift ×1