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

Thomas Skjelstad
Thomas Skjelstad
11,541 Points

If statement gives sigbrt

Hi, i am doing another side project. I have a custom made JSON file with a list of YouTube video ID's. What i would like to do is as follows. Check if youtubeURL matches @"missing". If it does it should hide the youtube button and if not it should show it. the nsstring is fetched off the internet like in the blogreader app.if ([youtubeURL isEqualToString:@"missing" ]){ buttonProperties.hidden = YES; }else{ buttonProperties.hidden = NO; }

} this gives me an sigbrt error. Can anyone help me with this it is kind of driving me nuts.

4 Answers

Set an exception breakpoint and po the object pointed to by the youtubeURL variable.

Thomas Skjelstad
Thomas Skjelstad
11,541 Points

Thank you, will give that a try when i get home.

Thomas Skjelstad
Thomas Skjelstad
11,541 Points

Oh for crying out loud, it was an NSURL with string content. Thanks mate it helped.

Thomas Skjelstad
Thomas Skjelstad
11,541 Points

Never copy and paste old code and not go through it properly. Lesson learned.