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 trialThomas France
4,139 PointsKeep having a breakpoint error after returning showFunFacts()
My code seems exactly similar to the one on the course but it keeps returning a breakpoint. I tried debugging with some println() but the breakpoint is still there.
The 'funFactLabel.text = factBook.randomFact()' seems to be working as the first fact is randomized properly when the app is launched....
Thanks
Code below :
'class ViewController: UIViewController { @IBOutlet weak var funFactLabel: UILabel!
let factBook = FactBook()
override func viewDidLoad() {
super.viewDidLoad()
funFactLabel.text = factBook.randomFact()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func showFunFacts() {
funFactLabel.text = factBook.randomFact()
}
}'
1 Answer
Caleb Kleveter
Treehouse Moderator 37,862 PointsDo you have a break point without knowing it? Look in the gutter on the left side of the code.