Michael Mangold
Michael Mangold

Reputation: 1801

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 executed. Can someone explain why I'm not seeing execution inside the scaleForGraphView method?

Upvotes: 0

Views: 64

Answers (2)

Rudy Velthuis
Rudy Velthuis

Reputation: 28806

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

Upvotes: 1

Dave DeLong
Dave DeLong

Reputation: 243146

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

Upvotes: 3

Related Questions