• 异常崩溃总结 iOS


    1.Unrecognized instance class:NSTaggedPointerString and selector:string

    示例:

    self.mTitleLabel.attributedText = [aModel.activeName getAttributeStrWithFont:kFontRatio(14) lineSpace:6];

    原因:

    调用NSAttributedString方法,字符串不能传nil

    解决:

    self.mTitleLabel.attributedText = [aModel.activeName?:@"" getAttributeStrWithFont:kFontRatio(14) lineSpace:6];

    2.data parameter is nil

    示例:

    NSDictionary * aDict = [NSJSONSerialization JSONObjectWithData:payloadData options:NSJSONReadingAllowFragments error:nil];

    原因:

    JSONObjectWithData传的字符串需要非空

    解决:

    if (!payloadData) {
            return;
        }
        NSError *error=nil;
        NSDictionary * aDict = [NSJSONSerialization JSONObjectWithData:payloadData options:NSJSONReadingAllowFragments error:&error];
        if (error) {
            return;
        }

    3.

     
  • 相关阅读:
    JavaWeb笔记
    Session案例_登录注销
    会话
    Cookie入门
    jsp入门
    if else优化
    cheap-source-map--不显示源码 、source-map--显示源码 、 eval--最快的编译办法
    npm run dev 克隆报错
    $emit和$on的用法
    npm
  • 原文地址:https://www.cnblogs.com/huangzs/p/13641380.html
Copyright © 2020-2023  润新知