开发者

Method Not Getting Called

I'm working on Stanford's CS193p (Fall 2010) assignment #3. I have the below code in a UIView subclass:

float scale = [self.delegate scaleForGraphView:self];

Breakpoints and NSLogs inside scaleForGraphView are never triggered, but NSLogs and breakpoints at the above line indicate that it is getting 开发者_JAVA技巧executed. Can someone explain why I'm not seeing execution inside the scaleForGraphView method?


Put in:

NSLog(@"%@", self.delegate);

I'd be willing to bet that either:

  1. It's the wrong kind of object
  2. It's nil


Without more code, that is hard to answer, but it looks as if self.delegate is nil.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜