Can we create xib (with view) programmatically ? If No, why & If yes, How ??
views:
32answers:
1
+4
A:
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.
Toastor
2010-09-22 11:21:55
There's tutorials out there on how to do this, but I hesitate to link to them without knowing the OP's intent. There's probably much easier ways to do whatever he's trying to do.
kubi
2010-09-22 12:02:27