错误引用segit UITextField"" !使用未解析的标识符'segueTitleLine.text“

时间:2016-02-10 16:51:30

标签: ios iphone swift segue

我正在构建一个Swift - Single View应用程序。我添加了一个“segue"查看以允许用户使用NSUserDefaults存储首选项。我希望segue能够填充NSUserDefaults的当前首选项。我认为这样做的地方是重写“prepareForSegue"但我无法弄清楚如何在没有错误的情况下引用segue中的UITextfield

  

" !使用未解析的标识符'segueTitleLine.text“

class ViewController: UIViewController {

    //miscellaneous @IBOutlets here
    ..
    //override viewWillAppear and viewWillLoad here

    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {

        let defaults = NSUserDefaults.standardUserDefaults()
        let titlePref = defaults.objectForKey("usertitleLineKey")!
        segueTitleLine.text = titlePref as? String     >>>>>>>  ERROR !Use of unresolved identifier ‘segueTitleLine.text
    }
 }

0 个答案:

没有答案