Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.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
Objective c 在iOS 8.0中,点击时不显示WebView嵌入式视频播放/暂停选项_Objective C_Uiwebview_Ios8 - Fatal编程技术网

Objective c 在iOS 8.0中,点击时不显示WebView嵌入式视频播放/暂停选项

Objective c 在iOS 8.0中,点击时不显示WebView嵌入式视频播放/暂停选项,objective-c,uiwebview,ios8,Objective C,Uiwebview,Ios8,我在webview中嵌入了视频,它是从应用程序包加载的,但现在我在iOS 8.0中遇到了一个问题 当我点击视频播放/暂停/停止和缩放选项面板时,我无法看到它。我可以让它全屏捏手势,能够看到全屏选项面板,但不能看到它,而正常发挥 uiwebview内容似乎不在中心位置,或者可能是内容大小增加了。我试图在网上找到它的解决方案,但找不到任何解决方案。我尝试了在uiwebview中嵌入视频的所有方法,但问题尚未解决。我认为播放选项出现了,但随着内容大小的增加,所以我认为播放选项的显示超出了范围。此问题仅

我在webview中嵌入了视频,它是从应用程序包加载的,但现在我在iOS 8.0中遇到了一个问题

当我点击视频播放/暂停/停止和缩放选项面板时,我无法看到它。我可以让它全屏捏手势,能够看到全屏选项面板,但不能看到它,而正常发挥

uiwebview内容似乎不在中心位置,或者可能是内容大小增加了。我试图在网上找到它的解决方案,但找不到任何解决方案。我尝试了在uiwebview中嵌入视频的所有方法,但问题尚未解决。我认为播放选项出现了,但随着内容大小的增加,所以我认为播放选项的显示超出了范围。此问题仅在iOS 8.0中出现,在iOS 6.0和7.0中可以正常工作

我为集成它所做的代码:

                webviewFrame = CGRectMake(335, 67, 675, 670);
                webview = [[UIWebView alloc] initWithFrame:webviewFrame];
                [webview setBackgroundColor:[UIColor clearColor]];
                [webview setOpaque:NO];
                webview.delegate=self;
                webview.autoresizingMask = UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth;
                [webview setScalesPageToFit:YES];
                [webview.layer setMasksToBounds:YES];
                [webview.layer setCornerRadius:15.0f];
                [webview.layer setBorderColor:[UIColor grayColor].CGColor];
                [webview.layer setBorderWidth:2.0];

                [self.view addSubview:webview];  
                webview.hidden=NO;
                webview.delegate=self;
                btn_Zoom.hidden=YES;
                btnMail.hidden=YES;

                UIScrollView* sv = (UIScrollView*)[webview.subviews objectAtIndex:0];
                sv.scrollEnabled=NO;
                [webview loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:strPath isDirectory:YES]]];


- (void)webViewDidFinishLoad:(UIWebView *)webView{
     NSLog(@"finish loading");
    [appDelegate hideIndicator];
     self.view.userInteractionEnabled=YES;

    CGSize contentSize = CGSizeMake(webView.frame.size.width,
                                    webView.frame.size.height);
    webview.scrollView.contentSize = contentSize;
    [webview setScalesPageToFit:YES];
    self.automaticallyAdjustsScrollViewInsets = YES;
    self.edgesForExtendedLayout = YES;

}

- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error
{
    NSLog(@"error=%@",error);
    [appDelegate hideIndicator];
    self.view.userInteractionEnabled=YES;

    CGSize contentSize = CGSizeMake(webView.frame.size.width,
                                    webView.frame.size.height);
    webview.scrollView.contentSize = contentSize;
    [webview setScalesPageToFit:YES];
    self.automaticallyAdjustsScrollViewInsets = YES;
    self.edgesForExtendedLayout = YES;
}
请为我找到这个问题的准确解决方案,因为我正试图从过去两天解决它