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

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'

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
Holger Liesegang
50,595 Points

I 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
Holger Liesegang
50,595 Points

Hi 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

Holger, 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

Ohh Yes Your Right My Compiler Just Needed to be refreshed, Thank You Soo Much :D

Holger Liesegang
Holger Liesegang
50,595 Points

You're welcome and happy programming, Phillip Sussman :)