所以,如果我们输出Person.a,Person自身没有a这个属性就去__proto__也就是Function.prototype上找: console.log(Person.a) // a1 而对于ibtool 因为上面说过prototype本身是一个对象,对象都有__proto__,一个object的__proto__指向它的构造函数(Object)的prototype,所以 console.log(ibtool.a 方法创建一个新对象,使用现有的对象来提供新创建的对象的__proto__ // 也就是Person.prototype这个对象的__proto__指向的是LivingThing.prototype var ibtool = new Person() console.log(ibtool.a) // a2 补充:关于Object.prototype 和 Function.prototype 我的理解是: Object.prototype
EOM exit 1 fi case $RESOURCE_PATH in *.storyboard) echo "ibtool --reference-external-strings-file RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" ibtool storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.xib) echo "ibtool `basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" ibtool
EOM exit 1 fi case $RESOURCE_PATH in *.storyboard) ibtool --reference-external-strings-file storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.xib) ibtool storyboard和xib格式 这两项资源文件是需要编译处理的,利用ibtool命令分别转成sotryboardc和nib格式。
在编译过程中,发现log中有下面的输出: ibtool: install: ranlib /path/to/relax/build/libbacktrace/lib/libbacktrace.a 可以看到调用了
很简单 只要勾勾选选就可以了 这边只涉及到一个更新的问题 通过 ibtools命令 可以使storyboard/xib生成新的代码 首先cd 到stroyboard/xib 目录 执行ibtool
分别是screen、perl,、gcc、make、automake、ibtool、 autocon、m4 安装方法: yum install screen yum install perl yum