iPhone App Logout

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? Thanks!


Do as follows,

1)Place your login view in first view controller.

2)Place your tabbar controller in second view controller.

3)Store the second viewcontroller instance in appDelegate(this will be used for navigation).

4)Now when the logout button is pressed,use the stored instance navigate ur view.

Need Your Help

Can I specify which host will have which rank in an MPI program?

parallel-processing mpi

I'm using MPI to execute a parallel job over a heterogeneous compute system. The nodes in my network are not all identical.

Share a message to another group using Yammer REST API and C#


I want to use Yammer REST API and C# to share a post to another group (not posting a new message but sharing existing post) from my C# application. Does anybody know how it can be achieved.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.