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

incomplete implementation

I go through all the stage for blog reader. it went well but, something made me wondering why the yellow error show up to my BlogPost.m

I'm not sure what I did it wrong or not, please check for me wether I'm mistyping it or not:

here my code:

#import "BlogPost.h"

@implementation BlogPost

-(id) initWithTitle:(NSString *)title {
self = [super init];

if ( self) {
    self.tittle = title;
}

return self;
}
  • (id) blogPostWithTittle:(NSString *)tittle { return [[self alloc] initWithTitle:tittle]; }

    @end

2 Answers

Were there other methods declared in the .h file that you haven't defined in the implementation file? If so, that could be one of the reasons the warning message appears.

here my .h file:

#import <Foundation/Foundation.h>

@interface BlogPost : NSObject 

@property (nonatomic,strong) NSString *tittle;
@property (nonatomic,strong) NSString *author;

// Designated Initializer
-(id) initWithTitle:(NSString *)title;
-(id) blogPostWithTitle:(NSString *) tittle;

@end

I ain't sure what's wrong with my code.