ios - Display Login Controller when logout from facebook -
I am developing an iOS application that needs to be logged into Facebook. So I have a login view controller which is my first window and is a group of only accessible controllers for logged in user.
In my Login Week Controller, I have implemented the Facebook Representative:
// LoginViewController.swift removal // Method of Facebook Representative loginViewShowingLoggedInUser (loginView: FBLoginView) {Println ("in user logs") // Push main controller of application} ... function loginViewShowingLoggedOutUser (loginView: FBLoginView) {println ("user logout") // Perhaps loginViewController (self)} function loginView (loginView: FBLoginView !, HandleError: NSError) code to appear here {println ("Error: \ (handleErr Or.localizedDescription) ")} What I would like to do: While displaying the log-in viewer, the Facebook representative is called logout method all the time, even if the controller is not currently displayed. I just can not push the scene because the logout method is displayed every time, so I end up in the infinite loop. Can you please explain to me what is the best way to do this? Should I tell the delegate method in the log-in visual controller? Bonus Question: The Facebook Representative login view is on the controller, the logout method is still called, even if another controller is displayed. An example method is being followed by loginViewShowingLoggedOutUser
, I'm sure that my controller's say will never be deleted and my representative method will always be asked even if the LoginViewController does not appear?
You can place your first navigation controller as your root controller. If the user has not been launched, at the launch time, you put a Model Log In Wii Controller. And if the user logs, then the app is running, then you just put another Model Login Week Controller.
Comments
Post a Comment