今天终于通过 BT 的方式下完了 iPhone SDK beta3。安装过程中发现几点仍在使用 PowerPC Mac 的开发人员需要注意的地方:

  • 已有多个网站报道虽然 Apple 官方申明 iPhone SDK 只能用于使用 Intel 处理器的 Mac 上,而且 SDK 安装包在 PowerPC Mac 上默认会跳过 iPhone SDK 的安装,但是你可以使用 Pacifist 安装之。然而这些报道都忽略了一点:iPhone SDK 可被安装至任何路径之下,只要安装完成后的文件夹内部结构不被改动即可,所以用 Pacifist 安装的话,安装路径为 ./ ,即启动磁盘的根目录,这样就全乱套了。本人在此感谢 iPhoneAtlas相应文章中留下评论的 gigeamircearaul 提供的解决方案:
    1. 用 Disk Utility 将 iPhone SDK.dmg 转换为可读写格式。
    2. 打开转换好的 R/W dmg。
    3. 你可能需要删除一些文件,因为镜像几乎完全填满了。我选择了删除镜像根目录中的 PDF 文件
    4. 修改 /Volumes/iPhone SDK/iPhone SDK.mpkg/Contents/iPhoneSDK.dist :

      - Line 71 (in function agreedToSLA() ) - modify “return false;” to “return true;”

      - Line 81 ( in function SDKPresent() ) - modify “return false;” to “return true;”
    5. 这样之后,你就可直接使用安装包安装 iPhone SDK 而无须使用 Pacifist 了。

  • 如想在 iPhone Simulator 中使用 pinching 的话,你只需在使用鼠标左键或触摸板的同时按下 Option。
    ( /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app )
Posted in Apple, Develope, Leopard, Tip at April 23rd, 2008. No Comments.

Just tested it out, and it works:

When inserting links in your posts, especially links to resources on your own blog, you can actually use absolute paths like “/wp-content/uploads/****.anyExtension”. This way if you ever decided to move your blog, say, another hosting, you save yourself tons of time wasted on editing these links.

The only limitations here are:

  1. It may require your blog to be self-hosted, meaning, it is not using any blog service provided by companies like WordPress.com, yo2.cn (this one is for us, Chinese), cause you probably don’t know how they store your uploaded files.
  2. On the new serve, you have to upload the files as originally structured on the old one. This requirement is not that hard to meet, I guess, since usually when you move your blog, you would want to make sure it is in almost the same structure for better search engine friendliness.

OK! And that’s it for today !

Posted in Tip, WordPress at April 5th, 2008. 1 Comment.

最新的 iPhone 软件更新 1.1.3 中加入了将网页作为 WebClip 添加至 Home Screen 的功能。不知细心的你在观看 Macworld 2008 上 Steve Jobs 的演讲视频时是否发现 Google 搜索被添加至 Home Screen 时图标并不是像 纽约时报 那样的网页截图,而是一个精心设计的图标。

想知道如何为你的网站设置一个 WebClip 图标吗?本文将教会你。

官方文档见:Create a WebClip Bookmark Icon

要为你的网站的所有页面设置 WebClip 图标,将你制作好的 PNG 格式的图标命名为 “apple-touch-icon.png” ,并将它放至网站的根目录。这一点类似于传统的 “favicon.ico”。

如果想为某一页面设置不同于网站其它页面的 WebClip 图标,你还需在页面的 “head” 元素内添加一个类似于

[code lang="html"] [/code]

的 “link” 元素。

WebClip 图标的尺寸至少应该为 57×57 像素。如果图标尺寸不同于此,图标将被缩放并裁剪至合适尺寸。

Safari 将会自动合成”玻璃材质”效果以使其看起来像内置 iPhone 或 iPod 程序。所以这个特殊效果可不要在设计图标时多加了噢!^o^

就到这里!Resting.

Posted in Apple, Design, Tip at January 22nd, 2008. No Comments.

Safari 3 里附带的 Web Inspector 为网页设计人员、网站开发人员提供了极大的便利。

但是如果你想在非 Safari 程序中使用它的话,应该怎么办呢?!

实际上,要实现这一点非常简单,只需在 终端 程序中使用如下命令即可:

defaults write com.apple.**NameOfApplication** WebKitDeveloperExtras -bool true

有图为证,我这是在 字典 程序中激活了这一功能,因为我想调整一下用 Mac Dictionary Kit 转换出来的字典的行高, 但又不知道所需调整的元素的 tag 是什么,所以只好找 Web Inspector 帮忙了。

其实你可以在任何一个基于 WebKit 的程序中启用 Web Inspector。

相关文章

Posted in Apple, Design, Tip at January 7th, 2008. No Comments.

原文见:macosxhints.com | 10.5: Enable Data Detectors in iChat

Leopard 的 Mail 程序中的数据探测功能可以在用户将鼠标移至一定数据附近时提供一些方便的功能:

  • 若是联系人信息,提供的选项是将之添加至用户的地址簿。
  • 若是事件信息,提供的选项是将之添加至 iCal 中的相关日历中。如果选择添加至 iCal 中,将会弹出一个与直接在 iCal 中添加事件一样的面板,而且弹出的过程同样使用了 Leopard 中新添加的 Core Animation

    在 Mail 中探测到事件信息

    Mail 中添加事件面板

然而实际上这个功能不只局限于在 Mail 程序中使用,在 iChat 同样可以用上, 只不过 Apple 把这个功能默认隐藏了。只需在 终端 程序中输入如下命令即可:

defaults write com.apple.iChat EnableDataDetectors 1

Data Detector in iChat

若要停用此功能,将上述命令中的 1 改为 0 即可。

defaults write com.apple.iChat EnableDataDetectors 0
Posted in Apple, Leopard, Tip at January 6th, 2008. No Comments.