Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Build a Simple iPhone App with Objective-C Creating a Data Model Using a Data Collection

Santiago Lopez
Santiago Lopez
3,446 Points

Threads when I code and I dont get why that happens

- (void)viewDidLoad {
    [super viewDidLoad];

// Do any additional setup after loading the view, typically from a nib.
    self.facts =  [[NSArray alloc] initWithObjects:@"Lopez",@"Lopezeselmejor      " ,nil];
    self.funFactLabel.text = [self.facts objectAtIndex:0];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)showFunFact {
    self.funFactLabel.text = [self.facts objectAtIndex: 1 ];  //here it says thread 1: breakpoint 1.1
    self.view.backgroundColor = [UIColor greenColor];
}
Martin Wildfeuer
Martin Wildfeuer
Courses Plus Student 11,071 Points

Hi Santiago Lopez, were you able to solve this? Please let me know, others might hit that problem, too.

1 Answer

Martin Wildfeuer
PLUS
Martin Wildfeuer
Courses Plus Student 11,071 Points

A bit late, but: it seems you have accidentally set a breakpoint on this line. That's indicated by a blue arrow behind the line number. To add one, you simply click the line number. Clicking on it again will toggle the disabled state of this breakpoint. To remove it, drag and drop it to the left. You can also use the breakpoint navigator, as explained in Apple docs.

Hope that helps :)