Elliot
Elliot

Reputation: 6136

Is it possible to directly edit the XML of XIB files?

I tried to do it, but Interface Builder refuses to open the resulting file:

alt text http://img81.imageshack.us/img81/7194/screenshot20091102at252.png

"Interface Builder was unable to determine the type of [file name]"

Upvotes: 2

Views: 2756

Answers (3)

Joey Hagedorn
Joey Hagedorn

Reputation: 2408

While the XML format of XIB files is intended to be somewhat human readable, XIB files should never be edited by hand. While the file may appear mergable, the object graph is complex and cannot be maintained except when edited within Interface Builder.

Even if it appears to work, this is unsupported and could lead to more complex problems down the road. It is better to instead file enhancement requests on Interface Builder to provide the capability you need, rather than try to hand edit the XML.

Upvotes: 2

mxg
mxg

Reputation: 21244

It is possible. Just the task's complexity is approaching the complexity of writing an web app in assembler.

Joking. It's highly not recommended. I think this Xib is not your and Interface builder is just not allowing you to use it.

Upvotes: 2

Kai Huppmann
Kai Huppmann

Reputation: 10775

To answer your question (as you put it in the title): Yes, it is. I did it with TextWrangler for a test (moved a widget) and it works like a charm.

I suspect, you also changed something else (encoding, file name) when you were editing the file. You should try it again with a copy of the xib and do a diff between original and result.

Upvotes: 2

Related Questions