【问题标题】:How show percent(%) when use UIWebView使用 UIWebView 时如何显示百分比(%)
【发布时间】:2012-06-19 01:23:14
【问题描述】:

使用 UIWebView 时,某些应用在加载网站时会显示百分比。 我找到了一些方法,但不能正常工作,比如:

1.使用 NSUrlConnection 获取 HTML ,然后使用 UIWebView 加载 HTML

- (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response
{
  theTotalLength = response.expectedContentSize;
}

但是,有时没有“expectedContentSize”可供获取。

2.使用私有功能,但不能发布AppStore。此功能 enter link description here

有人知道吗?

【问题讨论】:

    标签: iphone ios uiwebview


    【解决方案1】:

    您可以使用estimatedProgress 属性,详细说明here。请注意,它是一个私有功能,但根据指南,App Store 中有一些应用确实使用它。

    【讨论】:

    • 现在,在ios5.0sdk中没有privateFrame.frame。也谢谢。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-20
    • 2017-12-14
    • 1970-01-01
    • 2018-03-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多