【问题标题】:xcode5 ios7 error compiling codexcode5 ios7错误编译代码
【发布时间】:2013-09-26 12:03:57
【问题描述】:

我正在使用 xcode5 和 ios7,编译器显示此错误: 隐式转换将整数精度 long long 丢失为 NSInteger

     if (statusCode == 200 && !upload) {
    totalBytesExpectedToRead = [response expectedContentLength];

有什么帮助吗?

【问题讨论】:

    标签: iphone ios macos


    【解决方案1】:

    NSURLResponse expectedContentLength 返回类型long long

    我怀疑您已将 totalBytesExpectedToRead 变量声明为 NSInteger,如果您将其声明为 long long,则错误将消失。

    long long totalBytesExpectedToRead;
    

    【讨论】:

    • 对不起,我写错了变量名。您打算替换 totalBytesExpectedToRead 的声明
    猜你喜欢
    • 2014-02-04
    • 1970-01-01
    • 2013-11-23
    • 1970-01-01
    • 2018-07-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-11
    相关资源
    最近更新 更多