【发布时间】:2012-10-07 15:38:57
【问题描述】:
我有使用 UIWebView 显示的 html 内容。用户使用 UIPageViewController 导航页面。问题是页面显示后,web view 完成了内容的渲染。有明显的延迟使性能迟缓。
- (ContentViewController *)viewControllerAtIndex:(NSUInteger)index andPageIndex: (NSUInteger)pageIndex{
if (([self.pageData count] == 0) || (index >= [self.pageData count])) {
return nil;
}
Topic * topic = (Topic *)[pageData objectAtIndex:index];
ContentViewController * contentViewController = [[ContentViewController alloc] init];
[contentViewController setCurrentTopic:topic];
[contentViewController setCurrentPageIndex:pageIndex];
return hadeethViewController;
}
Content View Controller 不会渲染内容,除非它真的被 PageViewContoller 加载。有没有办法在 viewControllerAtIndex 返回之前强制加载视图?或者这种情况有什么解决办法吗?
【问题讨论】:
标签: uiwebview uipageviewcontroller