nib2objc

Set of tools and utilities (command line, GUI, Mac Service) to transform NIB files for the iPhone into Objective-C code files

  • 所有者: akosma/nib2objc
  • 平台:
  • 许可证: Other
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

h1. nib2objc - NIB to Objective-C converter

This utility converts NIB files (or XIB ones) into Objective-C code, including all the properties of each instance, the documented constructor calls, and also the view hierarchy. It uses the output of the ibtool utility bundled with the Xcode tools. For more information about ibtool, please check "the ibtool man page":http://developer.apple.com/DOCUMENTATION/DARWIN/Reference/ManPages/man1/ibtool.1.html.

h2. Usage

Compile and put the utility in your path, and then call

This will generate a file with the output of the conversion, similar to this (check out the included sample.m file for the full version):

The generated code takes into account the real class hierarchies in the UIKit, and it outputs the correct constructors and/or method calls for each object, depending on its class, including the enum values corresponding to the properties using them.

h2. Mac OS X GUI Application

The "GUI" folder contains a Mac OS X application that can be used to open several nib files and to see their contents as Objective-C code.

The GUI application uses the "Fragaria":http://github.com/mugginsoft/Fragaria library as a submodule, to provide syntax highlighting of the generated Objective-C code. Prior to compilation, please do the following:

h2. Mac OS X Service

A secondary project in the "Convert with nib2objc" folder creates an Automator action, that can be used to create Mac OS X services with Automator. The "Convert with nib2objc.zip" file contains an example of such a service, ready to be installed in ~/Library/Services, and which can be called from the Finder after selecting a nib file. The result of the conversion will be placed in the clipboard for pasting into any application.

h2. Limitations

  • For the moment this utility only works for UIKit views (iPhone), but it should be easy to extend to those of the AppKit too.
  • It cannot output the values of UIImage, NSLocale or NSTimeZone properties, because ibtool does not support them.
  • It does not distinguishes default values for properties, and as such, it outputs all the information it can find about a particular instance.

h3. Contributions

This project includes the nibs2objc.pl Perl script by Rudi Farkas, which allows users to perform batch transformations of nib files in a folder. Thanks Rudi for the contribution!

主要指标

概览
名称与所有者akosma/nib2objc
主编程语言Objective-C
编程语言Shell (语言数: 3)
平台
许可证Other
所有者活动
创建于2009-03-13 21:19:23
推送于2012-04-24 16:08:06
最后一次提交2011-11-07 18:40:09
发布数10
最新版本名称1.4 (发布于 )
第一版名称0.1 (发布于 )
用户参与
星数1.1k
关注者数51
派生数126
提交数121
已启用问题?
问题数11
打开的问题数0
拉请求数0
打开的拉请求数0
关闭的拉请求数3
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?