• 文件操作


    // 1. 导向下载
    //    NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"要下载的应用在appstore上的网址"]];
    //    [[UIApplication sharedApplication] openURL:url];

    // 2. 把数据写入属性列表
    //获得路径
    //NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    //NSString *fullpath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"cityDatalist.plist"];
    //NSData * cityDataToWrite = [NSPropertyListSerialization dataWithPropertyList:cityList
    //                                                                      format:NSPropertyListXMLFormat_v1_0
    //                                                                     options:0
    //                                                                       error:NULL];
    //[cityDataToWrite writeToFile:fullpath atomically:YES];

    //3. 从属性列表读取数据
    //NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    //NSString *fullpath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"cityDatalist.plist"];
    ////取出路径的内容
    //NSData *cityData = [NSData dataWithContentsOfFile:fullpath];
    //
    //    NSMutableArray * cityList = [NSPropertyListSerialization propertyListWithData:cityData
    //                                                                          options:NSPropertyListImmutable
    //                                                                           format:NULL
    //                                                                            error:NULL];
    //

  • 相关阅读:
    安装 log.io 实时监控 php_error 日志
    macOS安装Solr并索引MySQL
    如何创建一个GitLab Web Hooks?
    在macOS Sierra 10.12搭建PHP开发环境
    在MySQL中,如何计算一组数据的中位数?
    mongodb 学习笔记
    percona教程:MySQL GROUP_CONCAT的使用
    MySQL GROUP_CONCAT函数使用示例:如何用一个SQL查询出一个班级各个学科第N名是谁?
    EF| CodeFirst 代码先行
    最经典25本Python编程开发电子书精粹
  • 原文地址:https://www.cnblogs.com/jzlblog/p/4333299.html
Copyright © 2020-2023  润新知