Example for login screen modally based on storyboard
ios, modal-dialog, storyboard
Solution
Here is scenario . Its so simple . I just hope that it will be useful.
For the UITableBarController give a name for identity to storyboard id
Then in your ViewController class file You have the authentication credentials right >.? Do some stuff over there for authentication . then follow this code . It works fine
- (IBAction)Login:(id)sender {
if(authenticated) // authenticated---> BOOL Value assign True only if Login Success
{
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
UITabBarController *obj=[storyboard instantiateViewControllerWithIdentifier:@"tab"];
self.navigationController.navigationBarHidden=YES;
[self.navigationController pushViewController:obj animated:YES];
}
Problem
I am learning ios/ xcode and at a roadblock. I have a tabbarcontroller+navigation based design. I need to present a login screen if user is not logged in. Here is the basic heirarchy. The login page needs a navigationBar (as the tutorial I followed puts a "Go" button on the bar. ``` LoginController: (LTController.h,.m) Main View:TabBarController> NavigationController>View1>View1a NavigationController>View2 ``` I read lot of posts here on modal view, delegate method, etc. Most of them are code snippets which unfortunately are a bit over the head for my beginner level. Would appreciate a simple explanation as to how to achieve this. Espacially a note on which files needs changes would be great. thanks