A custom class with a prefix does not appear in the list of custom classes in the Builder interface

If I create a custom MTViewController class that is derived from a UIViewController, I cannot select it in the list box of custom classes in Interface Builder in Xcode 4.5. Does anyone know why?

+4
source share
3 answers

I think this is an interface error. It is also not related to the UIViewController or MTViewController. For some reason, it does not show some of the recently added class names, but if you enter it yourself and run the application, you will not get any errors.

Alternatively, you can try this by creating a class that simply closes the project and reopens it. If you go to the identifier inspector this time, you will see the class name there. SO, in my opinion, this is a bug in Xcode.

thanks

+7
source

You can try any of these steps.

  • Make sure it inherits the UIViewController. @interface MTViewController: UIViewController
  • Under target verification in the build phase, if MTViewController.m is present
  • Delete the UIViewController UI object and put it back and check if it returns to the user class

  • Just before reset, it will close your project and open it again.

0
source

Ok, I just upgraded iMac and Macbook to Xcode 6.3. On my iMac, everything was pinkish with my project, but on my Macbook I couldn’t get any of my custom view controllers to appear in the custom class field of the file owner of any of my xib. Even creating a new project will not work anyway. I knew this was not a problem with my project because it worked on my iMac.

Thus, after several attempts to use different solutions and settings, the only thing that worked was the removal of Xcode 6.3 and its reinstallation. I believe this problem arose because it came out of sync, as I have been updating through several versions of Xcode over the years.

Save the headaches for anyone reading this, and start with a clean version of Xcode if you get this problem.

0
source

Source: https://habr.com/ru/post/1437482/


All Articles