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 (iOS7) Testing and Debugging Debugging Basics

Dawid Cedrych
Dawid Cedrych
15,108 Points

Debugging reveals other issue

Hi! During this project I found one issue. We were supposed to delete our background image and alter it by the first image from animation images array. The thing is, the image was a bit different(a bit smaller crystal ball) from our previous background image, which leads to mismatched constraints. I fixed it on my own, but I must have done it wrong - I'm getting an exception thrown. I attach some printscreens - hope you guys help me, at least a bit :) Thanks!:)

Three images - one general view, and two with specification of exceptions

http://imgur.com/NuiB57A,TPinfJj,Bh76ser#0

Stone Preston
Stone Preston
42,016 Points

can you post a screenshot of the console log? the screenshots of the stack trace you have are helpful but the console is where the most useful info will be

2 Answers

Stone Preston
Stone Preston
42,016 Points

Ok its definitely a constraint (or more than one maybe) you added thats causing the exception. Basically your constraint says one thing and the app tries to make it happen but it cant work usually due to another conflicting constraint. Somethings not right and making the view fit the constraint isnt possible. I would delete all of them and start over. Debugging constraint issues like this is not fun. takes a lot of trial and error. When this happens I usually just go back and delete all the constraints and start over again.

Dawid Cedrych
Dawid Cedrych
15,108 Points

http://imgur.com/GeCtJnL

Sorry buddy, I forgot to check console:) Nevertheless I still don't know exactly what should be changed, maybe I should delete all constraints and set them again? Thanks!