Search code examples
iosiphonefacebookfbloginview

Crash when trying to set delegate - FBLoginView


I'm using facebook login in my app. It works well. But I'm getting a crash with no error message when I reopen the app after quit the app by double tap the home button. Xcode points to the class FBLoginView.m and method - (void)informDelegate:(BOOL)userOnly The delegate is nil inside the method. But the method calls from SetDelegate method where the delegate is not null Any idea about the reason for the issue. Thanks in advance.


Solution

  • I've removed the delegate connection from storyboard. And removed the code that used to set the delegate from viewdidLoad. I parsed the subviews of the fbLoginView and set action to the UIButtoon object. And set delegate inside the UIButton action method. Now it working well.