How to add a logout feature to an iPhone app?
问题 I've an app with this layout: When you open the app you see a login screen. You log in and you see a tabbar with 3 tabs. (The loginview is displayed with a presentModalView in the appdelegate of tabbar). In the third tab there is a logout button. I want when logout button is pressed the app delete NSUserDefaults and shows the loginview again. And if you login again the login screen disappear and you see the first tab of the tabbar. How can I do this? 回答1: Do as follows, Place your login view