0

i've got a probleme with an UISlider in a Master-detail application :

I've put my slider on the detail view, and I've link it into DetailViewController.h, and i let it empty into DetailViewController.m.

So i've got in DetailViewController.h :

- (IBAction)mySlider:(id)sender;

and in DetailViewController.m :

- (IBAction)mySlider:(id)sender {}

When i try to compilate, i've got this exception :

'NSUnknownKeyException', reason: '[<DetailViewController 0x754d490> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key mySlider.'

Do you know why?

Thanks.

2 Answers2

0

First of all: This is no compilation error, but a run-time error.

Secondly: Anywhere you used the mySlider. You can use keys for properties (not necessarily declared ones). But mySlider is an action (aka method).

Amin Negm-Awad
  • 16,582
  • 3
  • 35
  • 50
0

I got this error when I had connections in my view to objects that no longer existed. Try going to the connections inspector for your view in storyboard, (little right arrow in the top right of the screen) and seeing if there are any connections to objects that you might have deleted or changed the names of.

Mirror318
  • 11,875
  • 14
  • 64
  • 106