2013-09-26 47 views
1

我使用xcode5和ios7和編譯器顯示我這個錯誤: 隱式轉換失去整數精度很長很長到NSInteger的xcode5 ios7錯誤編譯代碼

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

任何幫助嗎?

回答

1

NSURLResponse expectedContentLength返回類型long long

我懷疑你已經宣佈你的totalBytesExpectedToRead變量爲NSInteger,如果你使它long long錯誤將消失。

long long totalBytesExpectedToRead; 
+0

謝謝,我取代它,但現在顯示:解析問題預計「]」 –

+0

對不起,我寫了錯誤的變量名稱。您打算替換totalBytesExpectedToRead的聲明 –