Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/117.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 如何在翻转到下一个视图时消除空白帧_Iphone_Ios_Webview_Flipboard - Fatal编程技术网

Iphone 如何在翻转到下一个视图时消除空白帧

Iphone 如何在翻转到下一个视图时消除空白帧,iphone,ios,webview,flipboard,Iphone,Ios,Webview,Flipboard,我当前正在使用(AFKPageFlipper) 在我的应用程序中生成所需的flipboard动画 ,有4个静态html页面,分别命名为1.html、2..等等 loadView - (void) loadView { [super loadView]; self.view.autoresizesSubviews = YES; self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexi

我当前正在使用(AFKPageFlipper)

在我的应用程序中生成所需的flipboard动画 ,有4个静态html页面,分别命名为1.html、2..等等

loadView

- (void) loadView {
[super loadView];
self.view.autoresizesSubviews = YES;
self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

flipper = [[AFKPageFlipper alloc] initWithFrame:self.view.bounds] ;
flipper.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
NSURLRequest *urlReq=[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle]
                                                                          pathForResource:@"1" ofType:@"html"]isDirectory:NO]];
;
//[web loadRequest:urlReq];

NSURLRequest *urlReq1=[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle]
                                                                           pathForResource:@"2" ofType:@"html"]isDirectory:NO]];
NSURLRequest *urlReq2=[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle]
                                                                           pathForResource:@"3" ofType:@"html"]isDirectory:NO]];
;
NSURLRequest *urlReq3=[NSURLRequest requestWithURL:[NSURL fileURLWithPath:[[NSBundle mainBundle]
                                                                           pathForResource:@"4" ofType:@"html"]isDirectory:NO]];

arr=[[NSArray alloc]initWithObjects:urlReq,urlReq1,urlReq2,urlReq3,nil];


flipper.dataSource = self;

[self.view addSubview:flipper];

 }
AFKFlipper的数据源

- (NSInteger) numberOfPagesForPageFlipper:(AFKPageFlipper *)pageFlipper 
 {


    NSLog(@"%i",arr.count);
    return [arr count];
 }


 - (UIView *) viewForPage:(NSInteger) page inFlipper:(AFKPageFlipper *) pageFlipper
{
 web= [[UIWebView alloc] initWithFrame:CGRectMake(0, 40, 320, 385)];
 [web loadRequest:[arr objectAtIndex:page-1]];

 return web;
}
我可以在多个网络视图之间切换,但我面临的问题是,当我翻转页面一半时,我看不到下一个视图,它似乎是一个空白页面,在我完全翻转页面后,它会被加载


在“flipboard”中,您可以部分看到下一个视图和上一个视图,如果将当前视图翻转一半,我应该如何显示下一个视图?我尝试了AFKPageFlipper,但我不认为篡改其原始代码是任何解决方案。 您可以尝试的是,准备好您将提供给AFKPageFlipper的所有视图

NSMutableArray *webViewArray;

-(void)viewDidLoad
{
  webViewArray=[[NSMutableArray alloc]int];
  for(int ii=0;ii<4;ii++)
   {
    web= [[UIWebView alloc] initWithFrame:CGRectMake(0, 40, 320, 385)];
   [web loadRequest:[arr objectAtIndex:ii]];
   [webViewArray addObject:web];
   web=nil;

   }

}

 - (UIView *) viewForPage:(NSInteger) page inFlipper:(AFKPageFlipper *) pageFlipper
{
  return [webViewArray objectAtIndex:page];

}
NSMutableArray*webViewArray;
-(无效)viewDidLoad
{
webViewArray=[[NSMutableArray alloc]int];

对于(int ii=0;i您是否尝试过将背景颜色更改为清晰颜色并加载下一页数据?@parilogic是..我尝试过使用web.backgroundColor=[UIColor clearColor]和web.opaque=NO,我想这是因为加载请求,直到页面完全翻转时才会加载webView Wesome..这就是我想要的