Chris G.
Chris G.

Reputation: 25964

xcode interfacebuilder Objects linked to custom class in Inspector?

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

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

But it is not listed in custom class, in Interfacebuilder Inspector?

Do you have to do something special?

Thanks in advance Regards Christian

Upvotes: 2

Views: 2890

Answers (2)

Mick MacCallum
Mick MacCallum

Reputation: 130193

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

Upvotes: 0

Nandeep Mali
Nandeep Mali

Reputation: 4456

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.

Upvotes: 1

Related Questions