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就可以

     

  • 相关阅读:
    09.Java数据算法
    08.Java反射问题
    07.Java类加载问题
    占位
    占位
    占位
    占位
    HTML与CSS粗浅摘要
    JavaScript(4):模态对话框、隐藏二级菜单及多选框的实现
    JavaScript(3):DOM选择器
  • 原文地址:https://www.cnblogs.com/superhappy/p/2787907.html
Copyright © 2011-2022 走看看