zoukankan      html  css  js  c++  java
  • 文件操作

    // 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];
    //

  • 相关阅读:
    ASP.NET调用word开发环境下正常,iis下报错
    关于CSS的两本书的感觉
    蓝牙模块在HHARM2410上的移植
    关于Activity和Task的设计思路和方法
    用蓝牙连接debian和诺基亚手机
    15.2 连接蓝牙设备
    蓝芽:Linux与手机(at,ftp)
    UBUTUN 通过蓝牙连接Hoary和诺基亚手机
    php class类用法总结 Leone
    提高PHP编程效率的53个要点 Leone
  • 原文地址:https://www.cnblogs.com/jzlblog/p/4333299.html
Copyright © 2011-2022 走看看