phoenix13

导航

 

2012年2月9日

摘要: 1.每个ios程序都有一个这样的目录:2.获取Documents目录: NSArray *path=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory=[path objectAtIndex:0]; NSLog(@"%@",documentsDirectory);在末尾附加另一个字符串来创建文件名NSString *fname=[documentsDirectory stringByAppendingPath 阅读全文
posted @ 2012-02-09 16:29 phoenix13 阅读(526) 评论(0) 推荐(0) 编辑
 
摘要: 1.获得屏幕尺寸 CGRect screenBounds=[[UIScreen mainScreen] bounds]; int screenwWidth=screenBounds.size.width; int screenHeight=screenBounds.size.height;2.获得时间 NSDate *nowDate = [NSDate date];// 获取本地时间 NSDateFormatter *formatter = [[NSDateFormatter alloc]init]; [formatter setDateFormat:@"y... 阅读全文
posted @ 2012-02-09 11:17 phoenix13 阅读(234) 评论(0) 推荐(0) 编辑