摘要:
1.每个ios程序都有一个这样的目录:2.获取Documents目录: NSArray *path=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory=[path objectAtIndex:0]; NSLog(@"%@",documentsDirectory);在末尾附加另一个字符串来创建文件名NSString *fname=[documentsDirectory stringByAppendingPath
阅读全文
摘要:
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...
阅读全文