1
Follow my scenario for better understanding:
- I have View Home calling View Login, by
pushViewController
. - In my Login View, 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 it returning to my Login View, is returning to my Home View;
I’m getting the following message in the log: Unbalanced calls to begin/end appearance transitions for <XXX.LoginTableViewController: 0x14eba93d0>
.
This is my login action, it won’t stay this way, but I was 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 Login View I have the login button of Twitter, which is working normally.
The app is using lib Enswiftsidemenu and saw all Alertview is using the
dispatch_async(dispatch_get_main_queue())
. If you take them they give the same error of the facebook view.– David Batista