PDA

View Full Version : Load tabbarcontroller without UIwindow




ilx.mac
May 22, 2009, 09:35 AM
Hi Friends,

I am developing an application to display user information. Initially i did it without using a login screen. But now, I require a login screen. I have created one.

My problem in brief:
I have created my page2(profile page which has to display user information only after successful login) in mainwindow.xib file.

I have created a login page for user validation now using a UIView XIB - login.xib.

I changed 'Main nib file base name' of Info.plist file to login.xib.

Now My problem grew worse. My application is terminating since I dont have a window in place in my login.xib file (Actually its with mainwindow.xib which is to my second page from now on).

Is there any way to solve this Issue? I am totally confused with it. Can some one provide me some inputs to move on from there?

Thanks in Advance!



BlackWolf
May 22, 2009, 11:34 AM
It's pretty simple.
put a UIWindow in your login.xib, which holds all the UI-Elements for the login.

in your mainwindow.xib, replace the UIWindow with a UIView and put that view in a UIViewController. It's a little work but possible. Actually, you should have never put anything in your mainwindow.xib in the first place. Put a UIViewController in your mainwindow.xib and put that UIViewController in a seperate xib - that prevents problems like that.