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 an Interactive Story App with Swift 2 Creating the User Interface Programmatically Page Controllers

Sebastian Nitu
Sebastian Nitu
8,616 Points

PageController does not appear as an option in the Identity Inspector after adding a new file.

After I go to File -> New -> iOS -> Source -> Cocoa Touch Class and create the Class "PageController" of type "UIViewController" the file is successfully added to my project. However, when I navigate to the Identity Inspector for the 2nd View Controller I do not have the option in the Class dropdown menu to select the PageController. If I manually type in the filename PageController and then I change the view controller's backgroundColor property to .blueColor() the chnages do not take effect. It seems like XCode does not link the View Controller to the PageController file.

Has anyone encountered this issue before?

Thanks in advance!

Sebastian

1 Answer

This just happened to me - I accidently created a new Cocoa Class file from OSX > Source, instead of a Cocoa Touch Class from IOS > Source.

JP