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 Playlist Browser with Swift Working With Multiple View Controllers Master-Detail User Interface

Oscar Alencar
Oscar Alencar
2,798 Points

Created classes doesn't appear on Identity inspector list

When I try to set a Custom Class, in the Identity Inspector, the created classes doesn't appear on the drop down list. Is that a problem?

Justin Bane
Justin Bane
7,850 Points

I am having exactly the same problem. Regardless of what I do the new view controller is not available in the list. Restarting is also not working for me.

Oscar Alencar
Oscar Alencar
2,798 Points

try to restart your mac, not only the Xcode

10 Answers

Oscar Alencar
Oscar Alencar
2,798 Points

Hey, fellows. Thank you very much for the help, but the problem was resolved only when I start my computer =// For now, I can continue studying without an error rsrsrs

Like Chris and Max said, the problem is usually that the wrong object is selected. I've run into this issue before. When you try to select an object in the Storyboard, it's difficult to be sure you have the right one selected. If you want to select the view, you have to make sure the entire view is highlighted with blue lines. You need to click it at the top (not the middle). You may have to click it twice. The best way to make sure you have the right thing selected is to open up the Document Outline and select it in there.

Chris Shaw
Chris Shaw
26,676 Points

Hi Oscar,

Make sure you have the correct object selected in the side panel as the identity inspector will only match the class to a valid base type.

Playlist Detail View

Thank you!

Justin Bane
Justin Bane
7,850 Points

So none of these worked for me... I dd not try restarting the machine, I wound up just deleting and recreating the project from scratch, when I did - it worked.

So it would seem that something was corrupt with the previous project. Not sure but it's a non issue for me now.

Max Lettenberger
Max Lettenberger
2,017 Points

Dang, thought I had it. Sorry it's been such a pain in the ass for you.

Rogelio Valdez
Rogelio Valdez
6,244 Points

Here is a tip: when you are in the storyboard use... ctrl + Shift + click This will give you options of what is below your mouse and then you can click "ViewController", "View", "Button" or whatever you have there, because this will show everything that is below the mouse. This is really helpful when you have items overlapping.

I had this problem, it was quite simple: i was clicking in the middle of the view. You have to click on the top part for it to work! hope this helped

Make sure that the class is a subclass of whatever the identity inspector is looking for, for example, if its looking for a view controller, make sure when you create the class, that it subclasses view controller.

Oscar Alencar
Oscar Alencar
2,798 Points

Yes Nick, I gave created a subclass os UIViewController...

class PlaylistDetailViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }


}
Max Lettenberger
Max Lettenberger
2,017 Points

Got it!

Click on PlaylistMasterViewController in far left and where your code says " ViewController : UIViewController " switch it to " PlaylistMasterViewController: UIViewController "

NOW try.

Worked for me.

SOLVED!

Just be sure that the YELLOW ICON (First from the left on the top of the View Controller) is clicked.

You will know that its click because it is inside a blue square. If not, CLICK THE YELLOW ICON.

:)