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?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?