【问题标题】:Get integer from UIWebView从 UIWebView 获取整数
【发布时间】:2011-08-29 15:13:46
【问题描述】:

我有一个网页输出我需要解析的整数。我知道如何从 UIWebView 中的网站获取字符串,但我需要将其作为整数获取。使用 [myString integerValue] 将字符串转换为整数在这里不起作用。我该怎么做?

编辑:这是我的错误

【问题讨论】:

  • 为什么不起作用?它给出了什么错误?

标签: iphone parsing sdk uiwebview integer


【解决方案1】:

警告背后的原因是您的变量不是整数,而是指向整数的指针。

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-07-19
    • 1970-01-01
    • 1970-01-01
    • 2014-02-04
    • 2012-12-23
    • 1970-01-01
    • 2011-08-20
    相关资源
    最近更新 更多