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 Blog Reader iPhone App Rebuilding from Scratch Adding a Table View Controller Class

Simulator 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?

https://gist.github.com/anonymous/f1503be535d7e0597496

10 Answers

Stone Preston
Stone Preston
42,016 Points

make sure your custom class is hooked up to your storyboard view controller correctly.

Yep, I followed that. Inside my storyboard view controller, i changed the custom class to TableViewController (autofilled for me).

Stone Preston
Stone Preston
42,016 Points

alright. was the simulator working before you ran into this?

Stone Preston
Stone Preston
42,016 Points

also does the console show any errors?

It was working perfectly fine when I worked with the previous video.

Stone Preston
Stone Preston
42,016 Points

ok so does the console show anything?

There 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
Stone Preston
42,016 Points

eh probably not if its always worked since then. Is there anything else? maybe scroll up or down and see if you see anything

i 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.

That 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
Stone Preston
42,016 Points

you 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.

That 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
Stone Preston
42,016 Points

there 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
Stone Preston
42,016 Points

you 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

Yeah, 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!

Deanna Robertazzi
PLUS
Deanna Robertazzi
Courses Plus Student 2,447 Points

I'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?