How to add login view in front of UISplitViewController iPad

I would like to show the login window in the UISplitViewController in my application. I'm not sure how to do this, since Apple docs regarding the iPad says that the UISplitViewController should be the application root controller.

+6
objective-c iphone ipad
source share
4 answers

Use the modal view manager to represent login. You can either make a full-screen view that is presented without animation, or (as I would do) a form style view that allows you to see the controller of a split view, but does not interact with it.

+5
source share

Do this in the application delegate. Before adding splitviewcontroller.view to your window. You add your login window and after you have successfully logged in, delete this login view and add splitviewcontroller.view

0
source share

First you can load your login view manager in the main window. after successful authentication, remove the window controller from the window using

[[[[UIAppDelegate window] subviews] objectAtIndex: 0] removeFromSuperview];

Add your splitview to the window. if you want to show the login again, delete splivew using the same part of the code and show the login page.

0
source share

Hey just use the popup with username and password. Using this u, you can still use Apple docs to use. I did the same with my application. Becz there is no legal way to add, besides splitting, a view as a root view controller.

UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Login" message:@"Enter username and password" delegate:self cancelButtonTitle:nil otherButtonTitles:@"Login", nil]; alertView.alertViewStyle = UIAlertViewStyleLoginAndPasswordInput; alertView.tag = AlertOne; [alertView show]; 

- (void) applicationDidBecomeActive: (UIApplication * application) call this popup in the delegate method in the appdelegate file. It works like a charm.

0
source share

All Articles