ios - Ignore presentModalViewController upon return -


so hoping simple , can done:

i have loginviewcontroller performs facebook login. have code setup once user enters or information , clicks login, returns same loginviewcontroller automatically segues tab controller. want have happen, button called "my profile" in view controller "profileviewcontroller" later in storyboard (6 views later) take me initial loginviewcontroller.

the issue segue have goes directly clicking "login" tab controller hard coded loginviewcontroller.m file. makes when click "my profile" in profileviewcontroller, takes me loginviewcontroller, segues automatically tab controller in beginning.

what want have segue ignored when click "my profile" button. here segue using (this in loginviewcontroller.m file):

uistoryboard *storyboard = [uistoryboard storyboardwithname:@"main" bundle:nil]; uitabbarcontroller *tabcontroller = (uitabbarcontroller *)[storyboard instantiateviewcontrollerwithidentifier:@"tabcontroller"]; [self presentmodalviewcontroller:tabcontroller animated:yes]; 

i want have segue ignored (aka run 1 time) while user logged in, clicking "my profile" button shows loginviewcontroller if above code not written @ (aka user profile view), , reset when user logs out , in.

you should override method - (bool)shouldperformseguewithidentifier: sender:(id)sender

return yes if it's first time(hasn't logged in yet) , no when he/she has logged in


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -