xcode interfacebuilder Objects linked to custom class in Inspector?

后端 未结 2 1920
时光说笑
时光说笑 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: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.

提交回复
热议问题