-1

I have a ios App where I used the storyboards.

I have a question: When the user return from background I will check if the user session is still valid. If this session is expired I would to send the user to login controller (second step on my storyboard) How can I do it?

CodaFi
  • 43,043
  • 8
  • 107
  • 153
Safari
  • 11,437
  • 24
  • 91
  • 191

1 Answers1

0

just do like this

pseudocode not a actual code

(void)applicationWillEnterForeground
{
if(sessionAvailable)
{
//do normal next working
}
else
{
LoginViewController *loginViewController=[self.storyBoard instantiateViewControllerWithidentifier:@"LoginViewController"];
[self.navigationController pushViewController:loginViewController animates:YES];
}
}
Ravindra Bagale
  • 17,226
  • 9
  • 43
  • 70