Value of type 'UIStackView' has no member 'delegate' - Swift Beginner's Guide
<p>Good morning everyone,
I'm brand new to Swift and I'm attempting to go through the guide on Apple's website and I'm getting stuck on this page: </p>

<p><a href="https://developer.apple.com/library/ios/referencelibrary/GettingStarted/DevelopiOSAppsSwift/Lesson3.html#//apple_ref/doc/uid/TP40015214-CH22-SW1" rel="nofollow">https://developer.apple.com/library/ios/referencelibrary/GettingStarted/DevelopiOSAppsSwift/Lesson3.html#//apple_ref/doc/uid/TP40015214-CH22-SW1</a> </p>

<p>I keep getting an error that says, "Value of type 'UIStackView' has no member 'delegate'" on line 21 of my code when I add the "nameTextField.delegate = self" part.  Any ideas?  I had initially thought I just hadn't added the protocol but it matches the guide....</p>

<pre><code>import UIKit

class ViewController: UIViewController, UITextFieldDelegate {

// MARK: Properties
@IBOutlet weak var nameTextField: UIStackView!
@IBOutlet weak var mealNameLabel: UILabel!

override func viewDidLoad() {
    super.viewDidLoad()
    // Handle the text field's user input through delegation callbacks

    nameTextField.delegate = self
}


override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}

// MARK: UITextFieldDelegate
func textFieldShouldReturn(textField: UITextField) -&gt; Bool {
    // Hide the keyboard
    textField.resignFirstResponder()
    return true
}

// MARK: Actions

@IBAction func setDefaultLabelText(sender: UIButton) {
    mealNameLabel.text = "Default Test Text"
}

}
</code></pre>