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 Objective-C Basics (Retired) Introduction to Objective-C Inheritance

Devendra Kumar Singh
Devendra Kumar Singh
769 Points

Getting bummer

what answer it is expecting. I tried everything it kept on saying don't forget to add @end

Stone Preston
Stone Preston
42,016 Points

what task are you on? can you post the code you used please?

6 Answers

Devendra Kumar Singh
Devendra Kumar Singh
769 Points

Let's create a base class called 'Gem'. In 'Gem.h' define a class named 'Gem' which is a subclass of 'NSObject'. my answer was "#import <Foundation/Foundation.h> @interface Gem : NSObject { } @end"

Stone Preston
Stone Preston
42,016 Points

the header file would generally look something like this:

@interface Classname : Superclass

@end

you dont need to import anything, so remove the import statement. also you dont need the { }

@interface Gem : NSObject

@end

please can you tell me what is the answer for Inheritance Challenge part 2

Devendra Kumar Singh
Devendra Kumar Singh
769 Points

I am doing challenge task after inheritance and I am stuck. I don't know what answer it is expecting

Devendra Kumar Singh
Devendra Kumar Singh
769 Points

I am doing challenge task after inheritance and I am stuck. I don't know what answer it is expecting

please can you tell me what is the answer for Inheritance Challenge part 2