I have html content which is displayed using UIWebView. User navigate pages using UIPageViewController. The problem is that the web view completes rending the content after the page is displayed. There is noticeable delay makes the performance sluggish.
- (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;
}
The Content View Controller will not render the content unless it is really loaded by the PageViewContoller. Is there any way to enforce the view to load before the viewControllerAtIndex returns? Or is there any solution for such situation?