2011-08-29 81 views
0

我有一個輸出需要解析的整數的網頁。我知道如何從UIWebView中的網站獲取字符串,但我需要將它作爲整數。使用[myString integerValue]將字符串轉換爲整數在此處不起作用。我怎樣才能做到這一點?從UIWebView獲取整數

編輯:這是我的錯誤 enter image description here

+0

它爲什麼不起作用?它給了什麼錯誤? – darksky

回答

0

警告背後的原因是,您的變量不是一個整數,而是一個指針到一個整數。

NSInteger *test = [onlineUsers integerValue]; 
     ^
Get rid of the asterisk