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:
- It's the wrong kind of object
- It's
nil
Without more code, that is hard to answer, but it looks as if self.delegate is nil.
精彩评论