Hi, Everything, that I am new to iOS development, and I am currently having a problem with something, I am trying to make a mod entry form if the user is not logged in.
I use NSUserDefaults to store an identifier, which I just check to see if it exists. If this is not the case, I would like the UIViewController to appear.
So far I have the following code in my UINavigationController, which is inside the UITabViewController, I am trying to make the UIViewController appear above the first UINavigationController (the one that is selected), at the time of animation, but there is only a black screen, even though The login screen has all the relevant text fields, etc. If I set this login screen as the initial view for loading, it will load normally.
This is the code that appears in the first UINavigationController view manager.
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults]; if (![prefs stringForKey:@"id"]){ LoginViewController *loginController = [[LoginViewController alloc] init]; [self presentModalViewController:loginController animated:YES]; } else { [self loadCoffeeUserOrders:[prefs stringForKey:@"id"]]; }
the modal view is loading, but for now it just looks black, I tried to create a new login screen and the same thing: nothing but a black screen.
I hope that for someone there is enough information to understand what may be, I am very new to iOS development, so if I made some mistakes, it would be nice to know where I am wrong.
thanks
Dan newns
source share