首页 \ 问答 \ Web浏览器不在Windows Phone 8上加载页面内容(Webbrowser not loading page content on Windows Phone 8)

Web浏览器不在Windows Phone 8上加载页面内容(Webbrowser not loading page content on Windows Phone 8)

我正在为某些网页构建一些缓存机制,因此如果网页已经存储在IsolatedStorage中,那么就不必在线获取它。 但是,当我加载页面时,内容(CSS,js,images)没有被加载,尽管文件已经在适当的路径中,文件中的路径看起来都是正确的。

当我尝试使用一个非常简单的html而只有一个图像时,内容被正确加载。

更复杂的网页有多个子目录,但内容的所有路径似乎都正确指向。

关于可能发生的事情的任何想法? 我已经尝试了几乎所有我在谷歌上找到的东西,没有成功。 这是WP8上Webbrowser控件的另一个错误问题,我不知道吗? 如果您有任何建议,我真的很感激。

先谢谢你!


I'm building somewhat of a caching mechanism for some webpages, so that if the webpage is already stored in IsolatedStorage, then it's not necessary to fetch it online. However, when I'm loading the page, the content (CSS, js, images) aren´t being loaded, although the files are already in the appropriate paths and the paths in the files all seem correct.

When I try using a very simple html with just an image in it, the content is loaded properly.

The more complex webpages have multiple sub-directories but all the paths to the content seem to be pointing correctly.

Any ideas on what may be happening? I've tried pretty much everything I've found on google, with no success. Is this just another buggy issue of the Webbrowser control on WP8 that I'm not aware of? I'd really appreciate if you have any suggestions.

Thank you in advance!


原文:https://stackoverflow.com/questions/30622435
更新时间:2023-01-08 20:01

最满意答案

我会注册UIPopover实例来收听一些通知。

[[NSNotificationCenter defaultCenter] addObserver:_myPopOver 
                                         selector:@selector(myDismissPopover)
                                             name:@"dismissPopover" 
                                           object:nil];

并为UIPopover类添加扩展。

- (void) myDismissPopover {
 [self dismissPopoverAnimated:YES];
}

当我需要解雇popover时,我只需要发布通知。

[[NSNotificationCenter defaultCenter] postNotificationName:@"dismissPopover" 
                                                    object:nil];

I'll write down my own solution as we've talked with bshirley in the comments of the question. I've implemented a mechanism like this to solve the problem:

In my login view controller, I create an NSMutableArray that will keep all my action sheets and popover controllers that are going to be dismissed. Then I store this array in a global dictionary. I access this dictionary via a utility method. Then all through the application, whoever creates an action sheet or a popover controller, adds the component to this array (retrieves the array from the global data, modifies it and then saves it back to the global data). Then when the user is thrown back to the login screen, in viewWillDisappear of my login view controller, I loop through this array and call the appropriate dismiss method by checking if the UIView I get from the array is an action sheet or a popover controller. Then I remove all the elements of this array and then store it back in the global data, again.

Hope this helps anyone who needs to implement a similar mechanism. Your comments will be appreciated.

相关问答

更多

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)