zoukankan      html  css  js  c++  java
  • ios NSString crash

    Recently encountered an exception, and solved a bit.

    exception description:

    Application Specific Information:
    *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSCFString rangeOfString:options:range:locale:]: nil argument' terminating with uncaught exception of type NSException abort() called

    First we look at the wrong reason, and then the corresponding code to find where it will go wrong, view the description of the method.
    Solution:
    NSString method "containsString:"
    Declaration
    -(BOOL)containsString:(NSString *)str;
    Parameters
    str -> The string to search for. This value must not be nil.
    Return Value -> YES if the receiver contains str, otherwise NO.

    成功的三大原则: 1、坚持 2、不要脸 3、坚持不要脸
  • 相关阅读:
    资源列表
    资源列表
    编程语言资源列表
    PyTorch简介
    Keras构建回归神经网络
    Keras简介
    Tensorflow之RNN,LSTM
    Tensorflow之CNN
    Tensorflow之dropout
    Tensorflow做分类
  • 原文地址:https://www.cnblogs.com/xulinmei/p/7421297.html
Copyright © 2011-2022 走看看