Swift textField acting as an Exit Type Object

Why the behavior happens. The view is invoked by a previous button. Any tips will be helpful. Thanks!