有一个视图,在Portrait中有一个UIWebview,在横向上有两个较小的UIWebViews - 在横向上,两个视图代表一本书的页面,并且有一些页面浏览的东西正在进行中。我无法确定第二个UIWebView的来源。当superview加载到横向中时,我只能访问左侧的一个视图。右侧的视图与正确的数据完美地显示,但是我无法从代码访问它,直到某些内容导致屏幕重绘,例如页面被“翻转”或方向改变。这听起来对任何人都很熟悉吗?
此外,我的NSLog功能不再起作用,我不知道在哪里点击以使其返回。请帮忙。
这是一些代码
// this is the function which is not accessing the view.
-(void) setCurrentTextSize:(int)cts {
for(int pageViewIndex = 0; pageViewIndex < [arrayOfReaderViewControllers count]; pageViewIndex++) {
readerViewController *r = [self arrayOfReaderViewControllers:pageViewIndex];
[r setCurrentTextSize:cts];
[r webViewDidFinishLoad:r.webView];
}
}
//this function populates arrayOfReaderViewControllers
-(void)initializeArrayOfReaderViewControllers {
readerViewController *vcLeft;
if([self.delegate isFirstLoad]) {
//we don't care what happens here 'cause it's not being called.
} else {
vcLeft = [readerViewController new];
if ( lastPageNumber > currentPageNumber) {
currentPageNumber = lastPageNumber;
[arrayOfReaderViewControllers replaceObjectAtIndex:0 withObject:[self jumpToPageVC:vcLeft]];
if(self.isLandscape) {
vcLeft = [arrayOfReaderViewControllers objectAtIndex:0];
[arrayOfReaderViewControllers replaceObjectAtIndex:1 withObject:[self getNextPageViewController:vcLeft]];
}
}
}
[self.delegate doMoreInitialization];
}