xcode interfacebuilder Objects linked to custom class in Inspector?

后端 未结 2 1911
时光说笑
时光说笑 2021-01-15 08:13

In Xcode(latest version) Interfacebuilder, you can link objects to code.

I have created one a class: @interface FileChangeController : NSObject

But it is not

相关标签:
2条回答
  • 2021-01-15 08:32

    First make sure that you have properly linked your view controller class to the interface builder view controller

    enter image description here

    Then using the assistant editor, you can drag the connection directly to code.

    enter image description here

    0 讨论(0)
  • 2021-01-15 08:35

    You have to subclass from UI* classes for that to appear in the inspector. For example:

    @interface FileChangeController : UIViewController
    

    That should make it visible in the inspector.

    Custom Class Inspector

    Also, it will be visible only for the relevant control. That is UIViewController classes will only be visible for view controller (duh!) objects.

    0 讨论(0)
提交回复
热议问题