xcode5 ios7错误编译代码

问题描述:

我使用xcode5和ios7和编译器显示我这个错误: 隐式转换失去整数精度很长很长到NSInteger的xcode5 ios7错误编译代码

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

任何帮助吗?

NSURLResponse expectedContentLength返回类型long long

我怀疑你已经宣布你的totalBytesExpectedToRead变量为NSInteger,如果你使它long long错误将消失。

long long totalBytesExpectedToRead; 
+0

谢谢,我取代它,但现在显示:解析问题预计“]” –

+0

对不起,我写了错误的变量名称。您打算替换totalBytesExpectedToRead的声明 –