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 trialBenjamin Ho
1,222 PointsSimulator Problem in Adding a Table View Controller Class
My build is successful but I keep getting a black screen in the simulator. This is my code for TableViewController.m
anything wrong with it?
10 Answers
Stone Preston
42,016 Pointsmake sure your custom class is hooked up to your storyboard view controller correctly.
Benjamin Ho
1,222 PointsYep, I followed that. Inside my storyboard view controller, i changed the custom class to TableViewController (autofilled for me).
Stone Preston
42,016 Pointsalright. was the simulator working before you ran into this?
Stone Preston
42,016 Pointsalso does the console show any errors?
Benjamin Ho
1,222 PointsIt was working perfectly fine when I worked with the previous video.
Stone Preston
42,016 Pointsok so does the console show anything?
Benjamin Ho
1,222 PointsThere is always this message in my console:
2014-02-13 18:24:02.585 BlogReader2[28016:70b] Cannot find executable for CFBundle 0xc4791b0 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk/System/Library/AccessibilityBundles/CertUIFramework.axbundle> (not loaded)
I've had this message for a long time now ever since I started the courses. But everything always worked. Would this be the cause of the problem?
Stone Preston
42,016 Pointseh probably not if its always worked since then. Is there anything else? maybe scroll up or down and see if you see anything
Benjamin Ho
1,222 Pointsi deleted the project and made a new one with the same code.
self.titles = [NSArray arrayWithObjects:@"The missing widget", @"Treehousefriends: Paul Irish", @"An Interview the the pope of ireland", @"Quick ways to learn how to code", "Getting a job in web design and development", nil];
Thread 1:EXC_BAD_ACCESS (code=1, address=0x74746553)
That code is highlighted with the thread error.
Benjamin Ho
1,222 PointsThat error went away after making sure the class is created under the folder with my storyboard instead of creating them in the root folder.
But I have another problem now which is that my storyboard doesn't recognize TableViewController as a custom class. The only option for autofill is UITableViewController. How can i remedy that?
Stone Preston
42,016 Pointsyou can type the entire name of the class in manually, it doesnt have to be autofilled. Sometimes your storyboard doesnt recognize new files you added, so just type in the name of the class you created and hit enter. It will make a strange noise if it doesnt work for some reason.
Benjamin Ho
1,222 PointsThat seems to be fixed now. When I run it now I get an error "Thread 1:signalSIGABRT" in the following line of code that is in main.m :
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
Stone Preston
42,016 Pointsthere should be more info in the console about that. there was an uncaught exception but gonna need more info to help you out.
Stone Preston
42,016 Pointsyou forgot to set a Cell identifier in storyboard. select your prototype cell in your storyboard and make sure you set the reuse identifier as Cell
Benjamin Ho
1,222 PointsYeah, I put that back in now. There was a mistake in my NSArray section from the TableViewController.m file too. Everything works now. Thanks for your help again!
Stone Preston
42,016 Pointsno problem
Deanna Robertazzi
Courses Plus Student 2,447 PointsI'm having the exact same issue. I've tried everything. I've compared my Xcode project to the one on the Treehouse website and they are identical. Yet I still have a black screen. What do I do?