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 trialOscar Alencar
2,798 PointsCreated 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?
Oscar Alencar
2,798 Pointstry to restart your mac, not only the Xcode
10 Answers
Oscar Alencar
2,798 PointsHey, 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
Michael Psoinos
8,178 PointsLike 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
26,676 PointsHi 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.
Mason Rose
3,210 PointsThank you!
Justin Bane
7,850 PointsSo 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
2,017 PointsDang, thought I had it. Sorry it's been such a pain in the ass for you.
Rogelio Valdez
6,244 PointsHere 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.
Finn Dumas
1,224 PointsI 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
Nick Janes
5,487 PointsMake 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
2,798 PointsYes 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
2,017 PointsGot it!
Click on PlaylistMasterViewController in far left and where your code says " ViewController : UIViewController " switch it to " PlaylistMasterViewController: UIViewController "
NOW try.
Worked for me.
Frankz Kastner
4,188 PointsSOLVED!
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.
:)
Justin Bane
7,850 PointsJustin Bane
7,850 PointsI 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.