Xaree Lee
Xaree Lee

Reputation: 3387

Share the same UI for two subclasses in Obj-C/Storyboard

I have a ViewControllerA, and its UI layout is designed in the Interface Builder (storyboard).

ViewControllerA has two concrete subclasses, ViewControllerB1 and ViewControllerB2; they have the same UI with its superclass ViewControllerA, but run with different logic.

How can I create two different concrete classes but they share the same UI with storyboard in which you must indicate the view controller's class?

Upvotes: 1

Views: 109

Answers (1)

Cy-4AH
Cy-4AH

Reputation: 4585

Unfortunately storyboard doesn't support subclassing. You should create delegate in ViewControllerA for different logic.

Upvotes: 1

Related Questions