Marmelador
Marmelador

Reputation: 1017

Connecting an .xib-File to a Custom Class

I have created a custom .xib-file and a custom subclass of UIView. What is the procedure to connect the two?

Meaning that when I set MyCustomClass in the custom class attribute, it turns into my custom .xib-file and acts according to MyCustomClass.swift.

Upvotes: 1

Views: 2049

Answers (2)

Sudipto Roy
Sudipto Roy

Reputation: 6795

Select Whatever.xib >> Click Show Identity Inspector >> Focus at Custom Class >> Edit Class as MyCustomClass See this example for Test.xib and Test.swift : enter image description hereenter image description here

Upvotes: 0

elk_cloner
elk_cloner

Reputation: 2149

Click on your Xib file and go here and set your custom Class here

Set your custom class name here

Upvotes: 2

Related Questions