开发者

how to set delegate to nil?

my table view controller calls below in viewDidLoad

myFBRequest= [facebook requestWithGraphPath:[NSString stringWithFormat:@"%@/feed", myId] andDelegate:self];

and in dealloc,

if (myFBRequest) myFBRequest=nil;

I do that because if user clicks on back button, I wanna ignore the response that came or coming back.

however, I get the below error

* -[FB开发者_JS百科Request setDelegate:]: message sent to deallocated instance 0x823e190

Why is that? I thought I have to set delegate to nil if I dont' want the response anymore?

I'm so confused.

Any help would be appreciated

Thanks, Bec


yes you can pass in andDelegate:nil if you don't want to response delegates.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜