Re: Login screen and TabBar
Re: Login screen and TabBar
- Subject: Re: Login screen and TabBar
- From: Hamish Allan <email@hidden>
- Date: Mon, 22 Nov 2010 11:21:16 +0000
Hi,
This list is designed for questions about the tools, not the
libraries. Please send any further queries of this type to Cocoa-dev
or ask on devforums.apple.com.
To answer your question: in your app delegate you add the login view
controller's view to your window. Once you're done with that, simply
remove that view from the window and add that of your tab bar
controller.
Best wishes,
Hamish
On 22 November 2010 10:43, Peaso <email@hidden> wrote:
> Hi,
>
> I'm a newby in programming for iOS devices, but I'm reading a lot of
> documentation and learning bit a bit.
>
> I've designed a TabBar app with a previous login screen. I need the user to
> be logged to load the TabBar view (I think I cannot use a "modal" for the
> login screen for that reason).
>
> Then, in the didFinishLaunchingWithOptions function of my App Delegate, I
> load the login view:
>
> Code AppDelegate.m:
>
> LoginViewController *thelogin = [[LoginViewController alloc]
> initWithNibName:@"LoginViewController" bundle:nil];
> [window addSubview:thelogin.view];
>
> Code AppDelegate.h:
>
> @interface tbAppAppDelegate : NSObject <UIApplicationDelegate,
> UITabBarControllerDelegate> {
> UIWindow *window;
> UITabBarController *tabBarController;
> UIViewController *loginViewController;
> }
> @property (nonatomic, retain) IBOutlet UIWindow *window;
> @property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;
> @property (nonatomic, retain) IBOutlet UIViewController
> *loginViewController;
>
>
> I've designed a button in the Login.xib to check credentials, make login and
> load the TabBarController. How to do that? Do I have to develop the "switch"
> function in the LoginViewController? How to load from there the TabBar
> Controller? Do I have to redesign the flow of my app? How?
> I got to see from the Login View XIB the function defined in the App
> Delegate, so I connect them (button and function) but it seems not to be
> executed when I press the button. If I define this action in the
> LoginViewController, it is executed but I cannot load the TabBar Controller.
>
> Thank you for your patience,
> Peaso
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden