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 trialPhillip Sussman
Courses Plus Student 2,882 PointsThe random quotes app needs an array of quotes. Declare a property named 'quotes'. Make it an NSArray and use the modifiers 'nonatomic' and 'strong'
Im Having Trouble with this i cant get it
import "UIViewController.h"
import "UILabel.h"
@interface THViewController : UIViewController
@property (nonatomic, strong) IBOutlet UILabel *quoteLabel;
}
@end
I Try Everything but nothing works
5 Answers
Holger Liesegang
50,595 PointsI just tested
Challenge task 1 of 3 / Question: "The random quotes app needs an array of quotes. Declare a property named 'quotes'. Make it an NSArray and use the modifiers 'nonatomic' and 'strong'."
#import "UIViewController.h"
#import "UILabel.h"
@interface THViewController : UIViewController
@property (nonatomic, strong) IBOutlet UILabel *quoteLabel;
@property (nonatomic, strong) NSArray *quotes;
@end
in the THViewController.h
and everything works just fine.
Holger Liesegang
50,595 PointsHi Phillip,
it works similar to the property above (the IBOutlet), just instead of the 'quoteLabel' property of type UILabel you have been asked to declare a property named 'quotes' of type NSArray:
@property (nonatomic, strong) NSArray *quotes;
...and welcome to Treehouse, Phillip :)
Kind Regards Holger
Phillip Sussman
Courses Plus Student 2,882 PointsHolger, It Keeps telling Me Bummer! Make sure you are creating a property named 'quotes' with the right modifiers!
And I Put @property (nonatomic, strong) NSArray *quotes;
By The Way Its In The ViewController.h
Phillip Sussman
Courses Plus Student 2,882 PointsOhh Yes Your Right My Compiler Just Needed to be refreshed, Thank You Soo Much :D
Holger Liesegang
50,595 PointsYou're welcome and happy programming, Phillip Sussman :)