zoukankan      html  css  js  c++  java
  • 对于 ios 项目中 warning 黄色警告的去除

    zipArchive 包里面有两个已经被弃用的方法:

    NSDictionary* attr = [[NSFileManager defaultManager] fileAttributesAtPath:file traverseLink:YES]; 
    warning:
    'fileAttributesAtPath:traverseLink:' is deprecated


    解决:改为

    NSError* error;

    NSDictionary* attr = [[NSFileManager defaultManager] attributesOfItemAtPath:file error:&error];

    NSString * strPath = [NSString  stringWithCString:filename];

    warning:stringWithCString is deprecated

    解决:改为

    NSString * strPath = [NSString stringWithCString:filename encoding:NSASCIIStringEncoding];

    2.JSONKit 的几个错误

       warning:   Direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()

    解决方案: replacing    object->isa   with   object_getClass(object)

    You will also need to replace   keyObject->isa   with   object_getClass(keyObject)    and   (id)keys[idx]->isa  with  object_getClass((id)keys[idx])

    jsonkit 还有 %lu与%u的提示 replace就可以

     

  • 相关阅读:
    第十四周学习进度
    第十三周学习进度
    第十二周学习进度条
    从用户体验角度评价所使用的输入法。
    个人博客十
    数组测试 --Junit
    看了build to win之后的感想
    思考题
    数组中最大子数组之和
    使用Espresso进行UI测试
  • 原文地址:https://www.cnblogs.com/superhappy/p/2787907.html
Copyright © 2011-2022 走看看