What's up with the .NIB -> .XIB?

旧城冷巷雨未停 提交于 2019-11-28 17:47:24

XIB's are very cool. they are basically an un-compiled NIB (in XML format if memory serves me)

during the build process they are converted to NIB's to be deployed in the final product.

Tom Dalling

As I understand it, xib files are xml nib files. xib files are compiled into nibs when the application is built. The xib format was created because nib files don't mesh well with version control (because they're not text), whereas a plain text xml file works well.

The other answers and link explain what XIB files are, but not about the specific change.

The new flat-file .xib format was introduced with Leopard (and Xcode 3.0) in 2007, but I believe that .nib remained the default, primarily for compatibility with older versions of Xcode and OS X. With Xcode 3.1, there was a shift to .xib as the preferred format. However, most documentation hasn't been updated, probably in part because the distinction is fairly minor from the standpoint of a normal developer.

I definitely echo the sentiment that XIB files are much better than NIB files, especially when using version control. (Flat files are much easier to manage than directory packages in most tools.)

the XIB file (XML Interface Builder) was introduced into Xcode because NIB files (Nxt Interface Builder) weren't so user/editable friendly. XIB's are designed in the format of a raw XML document making it a human-readable source code. Although the older bundled NIB files where editable, they were still a tiny bit more complicated than just a simple XIB, They contained multiple files including the XML XIB. Now most NIBs are compiled and are not readable by anything except for your Mac so it can read them. Apple started using compiled NIB files because people could read and understand the code put into other peoples programs :o. Xcode uses the "ibtool" command to compile nibs now. If you wish to know more about compiled Nibs go to my detailed answer at this post

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!