Tried many methods, but no effect.
p>
The latest one is that I tried to put the following code in the AppDelegate file at the end of the application didFinishLaunchingWithOptions but faced an error:
loginController = [[LoginController alloc] init];
[window addSubview:tabcontroller.view];
[window addSubview:loginController.view];
[window makeKeyAndVisible];
return YES;
< p>The error is that “loginController” is not declared.
What I missed. If there are other ways to meet my requirements, please let me know.
In addition, clickButton in the login (), I am using the event Touch Up Inside.
loginController = [[LoginController alloc] initWithNibName:@"login" bundle:nil];
[window addSubview:loginController.view];
[window makeKeyAndVisible];
Add the following line after completing the login check.
[window addSubview:tabcontroller.view];
Also, please check where loginCont is used?
Thank you,
I have an application that contains a tab bar view, and I have a login xib in the same application (login.xib ) And its corresponding class file (LoginController). I hope that when my application starts, the login file should be loaded first, and then once I click the login button, my TabBar view should start.
Tried many methods, but no effect.
The latest one is that I tried to put the following code in the AppDelegate file at the end of the application didFinishLaunchingWithOptions but faced an error:
< /p>
loginController = [[LoginController alloc] init];
[window addSubview:tabcontroller.view];
[window addSubview:loginController.view];
[window makeKeyAndVisible] ;
return YES;
The error is that “loginController” is not declared.
What I missed. If there are other ways to meet my requirements, please let me know.< /p>
In addition, on the clickButton() in login, I am using the event Touch Up Inside.
loginController = [[ LoginController alloc] initWithNibName:@"login" bundle:nil];
[window addSubview:loginController.view];
[window makeKeyAndVisible];
After completing the login check, add the following line .
[window addSubview:tabcontroller.view];
Also, please check where loginCont is used?
Thank you,