Xcode produces outlets as weak vars with implicit unwrapping, like this:
@IBOutlet weak var nameTextField: UITextField!
I wonder why it didn't just make onowned var
, which - in my understanding -
behaves exactly the same, but keeps the type non-optional. Is there any difference between these two?
weak var foo: UITextField!
unowned var foo: UITextField