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
RASHU BHATNAGAR
Courses Plus Student 2,669 PointsWhat am I doing wrong here
Hi guys,
referring to this challenge : http://teamtreehouse.com/library/introducing-the-project
The question is : Now switch to the implementation file and set the 'items' property to an array of two or more NSString objects using the 'arrayWithObjects' method of the NSMutableArray class.
I have typed the following code:
import "InboxViewController.h"
@implementation InboxViewController
- (void)viewDidLoad { [super viewDidLoad]; // Add custom code below! NSString string1=@"AAA"; NSString string2=@"BBB"; self.items=[NSMutableArray arrayWithObjects:string1,string2];
}
what is that I am doing wrong here... Please help....
1 Answer
Matthew Davies
14,579 PointsIt seems that you're missing a few things here:
Make sure to add the * in front of you variable names - example: NSString *string1
Also make sure you indicate the end of your array with "nil" - example: arrayWithObjects:string1, string2, nil];