swift - Text reappearing in TextField after creating a new user -
// alright need clear text field logout button pressed. "inputtoolbar" variable using in messagesviewcontroller, logout button on screen.
@ibaction func logoutuser(sender: anyobject) { let installation = pfinstallation.currentinstallation() installation.setobject("", forkey: "user") installation.saveinbackground() pfuser.logout() messagesviewcontroller.inputtoolbar.contentview.textview.resignfirstresponder() //segue splash screen self.navigationcontroller?.poptorootviewcontrolleranimated(true) }
with:
messagesviewcontroller.inputtoolbar.contentview.textview.resignfirstresponder()
you're dismissing keyboard, not in view @ point.
to clear text view, need reset text property with:
messagesviewcontroller.inputtoolbar.contentview.textview.text = ""