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
Noah Gray
801 PointsNo ViewController.h in my project for Crystal Ball App
Did I create the wrong kind of project maybe? Any way to recover?
5 Answers
Amit Bijlani
Treehouse Guest TeacherYou can either start again and select "Single View Application" or add a View Controller by selecting File > New > File (Command+N) select Objective-C class name it "ViewController" and make it a subclass of "UIViewController"
Noah Gray
801 PointsThanks, and we're not talking about MainViewController, right? ViewController is different and it should be there already?
Amit Bijlani
Treehouse Guest TeacherSame thing. You might have an older version of Xcode
Noah Gray
801 Points4.6.1.
Every time I make a new Single View Project (for iOS, under Application) it creates MainViewController.m and .h, not ViewController. So I have half my code in one, and half my code in the ViewController I made. As a result, I think, I see nothing it the logs (at all). I guess I will need to combine the two files.
EDIT: it seems to heave worked because I see "motion ended" in my log now.
Amit Bijlani
Treehouse Guest TeacherGreat! Whether your view controller is named 'MainViewController' or 'ViewController' it doesn't matter. As long as it generates a view controller when you use the Single View project template.