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 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 :)