Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/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
iOS:跳转到ppt中的特定幻灯片_Ios_Uiwebview_Powerpoint - Fatal编程技术网

iOS:跳转到ppt中的特定幻灯片

iOS:跳转到ppt中的特定幻灯片,ios,uiwebview,powerpoint,Ios,Uiwebview,Powerpoint,我有一个本地ppt文件,我正在用UIWebView打开,下面是代码,文件有10张幻灯片,现在根据要求,我想跳到一张特定的幻灯片,比如如果我想直接跳到幻灯片#3,那么如何使用此代码 -(void)loadDocument:(NSString*)documentName inView:(UIWebView*)webView { NSString *path = [[NSBundle mainBundle] pathForResource:documentName ofType:@"ppt"]

我有一个本地ppt文件,我正在用
UIWebView
打开,下面是代码,文件有10张幻灯片,现在根据要求,我想跳到一张特定的幻灯片,比如如果我想直接跳到幻灯片#3,那么如何使用此代码

-(void)loadDocument:(NSString*)documentName inView:(UIWebView*)webView
{
    NSString *path = [[NSBundle mainBundle] pathForResource:documentName ofType:@"ppt"];
    NSURL *url = [NSURL fileURLWithPath:path];
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    [webView loadRequest:request];
}

//open ppt into UIWebView like,
[self loadDocument:@"newone" inView:self.myWebview];
我在这里搜索,发现,他们在做什么

链接到幻灯片4,以便最初打开

但我的ppt文件保存在我的应用程序中的文档目录(本地)中


有什么建议吗?

您可以设置
UIWebview
ScrollView的偏移量

[[webView scrollView] setContentOffset:CGPointMake(widht, height) animated:YES];
在当前缩放比例中查找一张幻灯片的高度。将其乘以四,作为初始打开的第四页。并将上述代码与点CGPointMake(0,heightYouCalculated)一起输入