调用此委托函数时,我得到一个EXC_BAD_ACCESS:
OAuthTwitterController: (SA_OAuthTwitterController *) controller authenticatedWithUsername
任何想法?
我的班级看起来像这样:
@interface QuizzResultController: UIViewController <NSXMLParserDelegate,SA_OAuthTwitterControllerDelegate> {
IBOutlet UILabel *resultLabel;
IBOutlet UIButton *facebookButton;
IBOutlet UIButton *twitterButton;
IBOutlet UIButton *button3;
// .... other variables ...//
SA_OAuthTwitterEngine *_engine;
SA_OAuthTwitterController *controller;
}
/// .m
#pragma mark SA_OAuthTwitterControllerDelegate
- (void) OAuthTwitterController: (SA_OAuthTwitterController *) controller authenticatedWithUsername: (NSString *) username{
NSLog("@auth done with username : %@",username);
}
- (void) OAuthTwitterControllerFailed: (SA_OAuthTwitterController *) controller{
}
- (void) OAuthTwitterControllerCanceled: (SA_OAuthTwitterController *) controller{
}
崩溃发生在用户名的NSLog之前,在线程1中使用“objc_msgSend”
答案 0 :(得分:1)
您的日志声明不正确,应该是:
NSLog(@"auth done with username : %@",username);