So… what I decided to do was read through his tutorials and basically construct the classes in a way that made sense to me – with a few tweaks along the way of course ![]()
The code in all its glory is below. What we have is essentially a totally generic gravityObject class that can be dropped into any view, and any number of times. What’s more, you actually initiate the object with a starting position and a PNG image (which for me, made more sense than drawing a circle on the screen – but you can change this part to suit your needs. So, without further ado:
在iPhone手机应用程序开发中, 应用iPhone重力感应器方面的教程或例子文章几乎没有,英文方面较为完整的也比较少,今天发现了一个应用重力感应做的游戏的完整的教程(Gravity Tutorial for iPhone),值得借鉴和参考。
总共分为5个部分讲解,下面是各章节的连接地址:
Gravity Tutorial for iPhone Part 1 Gravity Tutorial for iPhone Part 2
V2EX,很好的一个互动社区系统,可惜作者开发到0.6版本后就再没有更新了。
目前的安装包下载地址为:project-babel-v0.6.zip
关于安装环境可以查看项目的的官方地址:http://code.google.com/p/project-babel/
基本环境为:
PHP - 5.0/5.1/5.2/6.0
MySQL - 4.1/5.0/5.1/6.0
Web Server - Apache 2.0/2.2 with mod_rewrite
原来官方有个安装说明在:http://labs.v2ex.com/installation.php 不过现在好像访问不了,所以很难找到完整的安装说明。
以下是经google后的原安装说明(包含project-babel-v0.5版本的升级安装):
原文标题
Drawing a Grid in a UITableView
UITableView is probably the most used view on the iPhone. It’s flexible and the UI is ideally suited to use on the iPhone. There are lots of examples on how to add multiple items to a UITableViewCell. However, I needed to present some data in a more traditional spreadsheet style grid. The results worked well and enabled me to pack a lot of information on the screen that was very hard to follow without the vertical grid. I’ll show a very simplified version here you can use to add vertical lines to your UITableView.

每年的12月25日,是基督教徒纪念耶稣诞生的日子,称为圣诞节。
从12月24日于翌年1月6日为圣诞节节期。节日期间,各国基督教徒都举行隆重的纪念仪式。圣诞节本来是基督教徒的节日,由于人们格外重视,它便成为一个全民性的节日,国家一年中最盛大的节日,可以和新年相提并论,西方类似我国过春节。
西方人以红、绿、白三色为圣诞色,圣诞节来临时家家户户都要用圣诞色来装饰。红色的有圣诞花和圣诞蜡烛。绿色的是圣诞树。它是圣诞节的主要装饰品,用砍伐来的杉、柏一类呈塔形的常青树装饰而成。上面悬挂着五颜六色的彩灯、礼物和纸花,还点燃着圣诞蜡烛。
...
