Reputation: 7623
Can we create xib (with view) programmatically ? If No, why & If yes, How ??
Upvotes: 1
Views: 517
Reputation: 8990
Xibs are just files, too, so there's no technical reason why you wouldn't be able to create one programmatically.
Expect no convenience methods to create xibs however, as their purpose is to circumvent the need to create and configure UI elements programmatically, so what you would like to do is exactly the opposite of what people normally use xibs for.
If you really must create xibs though, just open one in a texteditor - you'll see that it consists of readable xml code. It may take some time to work through all the keys and possibilities, but creating xibs programmatically can be done.
Edit: it's gonna be hard, though.
Upvotes: 6