【问题标题】:IOS Swift - UIWebView jump to anchor tagIOS Swift - UIWebView 跳转到锚标签
【发布时间】:2017-03-30 19:16:35
【问题描述】:

我正在加载一个本地 html 文件,并想跳转到页面某处的锚标记。我正在使用此代码加载文件:

        let documentDirectoryURL = try FileManager.default.url(for: .documentDirectory, in: .userDomainMask, appropriateFor: nil, create: true)
        let fileDestinationUrl = documentDirectoryURL.appendingPathComponent("page.html")
        let request = URLRequest(url: fileDestinationUrl)
        webView.loadRequest(request)

是否可以跳转到此页面上的锚标记

【问题讨论】:

    标签: html ios swift uiwebview


    【解决方案1】:

    我刚刚确认它们也可以在 iPhone6 上运行,在将其操作系统更新到 iOS 10.3(与模拟器版本相同)后。

    【讨论】:

      猜你喜欢
      • 2013-12-06
      • 1970-01-01
      • 2012-05-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-04-05
      • 2015-10-16
      相关资源
      最近更新 更多