1 随机数的使用
- 头文件的引用
- #import <time.h>
- #import <mach/mach_time.h>
...
Tags: UINavigationController iPhone object-c navigation viewcontroller
原作者:Lin
After a lot of trial and mistakes, finally I kinda figured out how to make UINavigationController work…
1. initialise
To initialise:
1.1. with a default root controller:
self.controller = [mainController getInstance];
self.nav = [[UINavigationController alloc]
initWithRootViewController:self.controller];
...
Tags: UINavigationController 手机 程序 cocoa object-c
给UITableView增加一个好看的背景能为应用程序增色不少,并能促进app的销售,但是随便增加一个背景图片会史你的app更加丑陋。
错误的方式:
- //This method produces odd artifacts in the background image:
- ATableViewController *yourTableViewController = [[ATableViewController alloc] initWithStyle:UITableViewStyleGrouped];
...
Tags: UITableView 手机 程序
用过了NavigationBar的titleView和leftButtonItem,rightButtonItem后,我们也可以修改NavigationBar的backBarButtonItem。
用自定义一个backBarButtonItem用BarButtonItem声明,也可以用hidesBackButton来隐藏NavigationBar的返回按钮呢!
UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeInfoLight];
...Tags: 手机 程序 开发 cocoa navigation
电话订票966688688或短信订票成功预订后:
西安:须于订票成功之时起至次日23:00以前,到市内各火车票代售点取票。
汉中、安康:须于订票成功之时起至次日17:00以前,到市内各代售点取票。
延安、宝鸡:须于订票成功之时起至次日16:00以前,到市内各代售点取票。
榆林:须于订票成功之时起至次日12:00以前,到榆林宾馆代售点取票。
渭南:须于订票成功之时起至次日17:00以前,到站北路代售点取票。地址:前进路南段19号
咸阳:须于订票成功之时起至次日18:30以前, 到咸阳市人民路代售点取票。地址:人民路医药大厦一层(北门口人民医院) 乐育路代售点 地址:乐育南路人民商场对面联运楼三层 彩虹桥代售点 地址:宝泉路1号彩虹桥新区大门
杨陵:须于订票成功之时起至次日23:00前,到杨陵车站取票。 (另外,以上各开通站可实现通订通取)
西安火车电话、短信订票方式
订票电话:96688688(24小时开通)
按1——订票须知
按2——普通订票
按3——动车订票
按4——简单订票
按5——学生订票
按6——取消订票
注:订票成功收取1元/张的信息费,不成功只收基本通话费。
短信平台:发送短信D到10626688
1.预定席位:发送短信“D#发车日期#车次#上车站#下车站#席别#票种#张数#身份证号码”到10626688。(例如:D#0121#T42#西安#北京西#硬卧#全#1#6101011983XXXX)
2.查询已定席位:发送短信“Z#发车日期#身份证号码”到10626688。
3.其他查询功能:发送短信“H”到10626688,获得相关业务免费帮助信息。
注:短信息同开通时间为早上8:00——22:00。短信订票预售期为3——10天。
西安市火车票代售点一览表
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.



