Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Build a Playlist Browser with Objective-C Managing Playlist Data Using a Playlist Instance

exception NSUnknownKeyexception

Hi i got this error , can anyone help me? Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<PlaylistMasterViewController 0x7fe5fb5130a0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key playListImageView0.'

And here is the MasterViewController.m

#import "PlaylistMasterViewController.h"
#import "PlaylistDetailViewController.h"
#import "Playlist.h"

@interface PlaylistMasterViewController ()

@end

@implementation PlaylistMasterViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.singleButton setTitle:@"Press me!" forState:UIControlStateNormal];

    Playlist *playlist = [[Playlist alloc] initWithIndex:0];
    self.playlistImageView0.image = playlist.playlistIcon;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender{

    if([segue.identifier isEqual:@"showPlaylistDetail"]){
        PlaylistDetailViewController *playlistDetailController = (PlaylistDetailViewController *)segue.destinationViewController;
        playlistDetailController.segueLabelText = @"Yayyy!!";
    }

}
@end

its done guys i just have duplicate outlet for the image, and not remove it, sorry!

1 Answer

its done guys i just have duplicate outlet for the image, and not remove it, sorry!