Hello, in this case it will be necessary to carry out this process in Appdelegate
Example This:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
// EM - Implementação da verificação do cadastro da função do Device
NSIndexPath * indexPath;
[PlistManager deletePlist:@"ServerControllerPWD" location:@"doc"];
Password * passConference = [[PWDataController sharedInstance].PWData objectAtIndex:indexPath.row];
if ([passConference.functionVC isEqualToString:@"Servidor"]) {
ServerViewController *appStartViewController = [[ServerViewController alloc] init];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:appStartViewController];
[navController setModalPresentationStyle:UIModalPresentationFullScreen];
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UIViewController *vc = [storyboard instantiateViewControllerWithIdentifier:@"Server"];
self.window.rootViewController = vc;
[self.window makeKeyAndVisible];
} else {
nil ;
return YES;
}
This example is taking the data of an object that has the data stored in a Plist.
Make this comparison if there is data or not, if there is data it opens the registration screen, if there is data it opens the related view.
In your case this "_register" refers to what ?
Try to put inside the
viewDidAppear
, because you can only make screen calls after the current view is already being displayed– Jeferson Assis
I’m trying here, so I’ll let you know if I made it.
– CristianCotrena
It worked! Thank you Jeferson.
– CristianCotrena