Here's my scenario for better understanding:
- I have View Home calling View View, by
pushViewController
. - In my View Login, there is the custom Facebook button that is normally calling the facebook authorization page;
- But the return of the facebook permission screen is causing me problems, instead of returning to my View Login, is returning to my View Home;
I'm getting the following message in the log: Unbalanced calls to begin/end appearance transitions for <XXX.LoginTableViewController: 0x14eba93d0>
.
This is my action for login, it will not stay this way, but I've been simplifying the most to try to find the problem:
@IBAction func facebookButton() {
let login = FBSDKLoginManager()
login.logInWithReadPermissions(["public_profile", "email"],
fromViewController: self) { (result, error) in
if error != nil {
print("deu merda")
} else if result.isCancelled {
print("cancelou")
} else {
print("login")
}
}
}
Note: In the same View Login I have the Twitter login button, which is working normally.