cjor10
cjor10

Reputation: 11

How to load a xib inside uiview?

I'm working in an ipad splitview app in which I have multiple IB elements now I added a UISegmentedControl and a UIView, what I want to do is when the Segmentedcontrol is switched the uiview should load and show another xibs that i have in my app. How can I do that?

Upvotes: 1

Views: 686

Answers (2)

Akshay
Akshay

Reputation: 2983

Use NSBundle to load the nib |

Upvotes: 0

Jonah
Jonah

Reputation: 17958

You can use NSBundle to load a nib with your controller as the File's Owner. That gives you an easy way to load additional nib files and bind the views they contain to properties on your current controller. It will then be up to you to add those newly added views to your view hierarchy as appropriate for your app.

Upvotes: 1

Related Questions