Loading a defferent XIB file after Application launches in TabBar Application Template

I'm creating an app where user needs to login first and only after that they can view anything in the app. To achieve that, I have created a new XIB file with the name 'AuthView'.

I know I need to put the code inside 'applicationDidfinishLaunching' method, but I don't know what code do I need to put inside it.

I'm developing the app using 'Tab Bar Application' template.

Any help would be greatly appreciated. :)


By default the end of the ApplicationDidFinishLaunchingWithOptions method looks like this:

[window addSubview:tabcontroller.view];
[window makeKeyAndVisible];
return YES;

Adding a viewController that appears over everything first is easy. First, add the viewController to your implementation (using the real name of your controller, obviously):

#import "InitialScreenViewController.h"

Then modify the end of your ApplicationDidFinishLaunchingWithOptions method by adding two lines as shown:

[window addSubview:tabcontroller.view];
initialScreenViewController = [[InitialScreenViewController alloc] init];
[window addSubview:initialScreenViewController.view];
[window makeKeyAndVisible];
return YES;

Once you've verified the login (or whatever you want to do with the initial screen) simply dismiss it within the initial screen viewController like this:

[self.parentViewController.view setHidden:YES];

This wil allow you to show it again later if need be, like if you add logout and re-login functionality.

Need Your Help

How to apply a distortion filter for the UIImage?

iphone image image-processing

I need to apply distortion image effect for uiimage? I dont know where i can get a complete algorithm or examples? Please help me out

C# Assembly.Load vs Assembly.ReflectionOnlyLoad

c# reflection assembly.load assembly.reflectiononly

I'm trying to understand the differences between Assembly.Load and Assembly.ReflectionOnlyLoad.

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.