摘要: NSDate常用代码范例 NSDate类用于保存时间值,同时提供了一些方法来处理一些基于秒级别时差(Time Interval)运算和日期之间的早晚比较等。 1. 创建或初始化可用以下方法 用于创建NSDate实例的类方法有 + (id)date; 返回当前时间 + (id)dateWithT... 阅读全文
posted @ 2011-09-05 21:29 wujian1360 阅读(569) 评论(0) 推荐(2) 编辑
摘要: //字符串//////NSString类实例方法NSLog(@"输入的网址为:%@",str);//查值int str_len = [str length];//求其长度NSLog(@"长度为:%d字节",str_len);char c = [str characterAtIndex:11];/... 阅读全文
posted @ 2011-09-05 21:27 wujian1360 阅读(872) 评论(0) 推荐(1) 编辑
摘要: 创建一个 Timer +scheduledTimerWithTimeInterval: invocation: repeats: + (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti invocation:(NSInv... 阅读全文
posted @ 2011-09-05 21:18 wujian1360 阅读(76333) 评论(0) 推荐(6) 编辑
摘要: 在http://code.google.com/p/cocos2d-iphone/ downloads/list中下载了cocos2d-iphone-1.0.0,为了便于我们在 命令行工具(Terminal)中找到解压缩的路径,将下载下来的压缩 文件解压在文稿( Documents) 目录下。 打开... 阅读全文
posted @ 2011-09-05 20:59 wujian1360 阅读(288) 评论(0) 推荐(0) 编辑
摘要: ////EventReporter10ViewController中的代码 #import @interface EventReporter10ViewController : UIViewController {//在IB中创建一下四个控件,用来检测touch数据 IBOutlet U... 阅读全文
posted @ 2011-08-31 20:58 wujian1360 阅读(2884) 评论(0) 推荐(0) 编辑
摘要: 当iPhone走进生活时,做好每一个属于我们的iPhone作品,就是我们的信念 1.去RegexKitLite下载类库,解压出来会有一个例子包及2个文件,其实用到的就这2个文件,添加到工程中。 2.工程中添加libicucore.dylib frameworks。 3.现在所有... 阅读全文
posted @ 2011-08-29 19:23 wujian1360 阅读(460) 评论(0) 推荐(0) 编辑
摘要: #import "TestViewController.h"@implementation TestViewController- (void)viewDidLoad { [super viewDidLoad]; //创建与删除: //创建文件管理器 NSFileManag... 阅读全文
posted @ 2011-08-29 19:16 wujian1360 阅读(2949) 评论(0) 推荐(0) 编辑
摘要: #import "TurnViewController.h"@implementation TurnViewController- (void)dealloc{ [super dealloc];}-(void)doScale:(id)sender{ UIView *centerVie... 阅读全文
posted @ 2011-08-29 19:12 wujian1360 阅读(1545) 评论(0) 推荐(0) 编辑
摘要: 创建View based工程文件,导入框架MapKit.framework CoreGraphics.framework libicucore.dylib(重要)。 详见源码下载:http://files.cnblogs.com/wujian1360/TheMapRoute... 阅读全文
posted @ 2011-08-29 18:42 wujian1360 阅读(3995) 评论(0) 推荐(0) 编辑
摘要: #import @interface TestGestureRecognizerViewController : UIViewController { UIView *aView;}@property(nonatomic,retain)IBOutlet UIView *aView;@en... 阅读全文
posted @ 2011-08-29 16:10 wujian1360 阅读(31065) 评论(0) 推荐(2) 编辑