如题:
在Swift项目中引入 Superwebview,打开后乱码.
let url = "widget://index.html" [color=rgba(0, 0, 0, 0.85)] let name = "index" [color=rgba(0, 0, 0, 0.85)] let windowContainer = APIWindowContainer(attribute: ["url": url, "name": name]) [color=rgba(0, 0, 0, 0.85)] windowContainer?.startLoad() [color=rgba(0, 0, 0, 0.85)] [color=rgba(0, 0, 0, 0.85)] //主窗口打开 self.navigationController?.pushViewController(windowContainer!, animated: true)
这样打开后,页面是乱码的.
尝试地址修改为百度或bili,是可以正常打开网页的. 但是打开本地的index就会乱码了. 请问这个可能的原因是什么?
参考官方文档, 只不过是一个Swift的项目, 稍有变化. 能正常的引入 ,正常的打开厚度. 编译没什么问题,不是编译和引入的问题,只是加载自己本地页面有问题.
这个项目是原来OC版本的一直在用,没有问题的.
猜测是对Swift的支持上面,有什么未知的配置项. 请不吝赐教.
|