iosppt怎么在安卓ios 显示ppt

药品服务许可证(京)-经营-违法不良信息举报: 电话、邮箱youkujubao@service.alibaba.com请使用者仔细阅读优酷、、、、和Copyright(C)2018 优酷 youku.com 版权所有IOS/ANDROID简单PPT/PPTX编辑播放功能 | Java | Objective C
IOS/ANDROID简单PPT/PPTX编辑播放功能
1、PPT/PPTX任何一种格式支持即可
2、只需要支持部分简单的动画即可,如移动、渐变。当然能支持的越多越好。
3、可以做简单的编辑,如画线等,这块需要是你提供技术支持,由我们来完成。简单来说,我们需要在PPT播放的时候,可以暂停,然后做些写写画画和录制等操作,需要你提供格式方面的技术支持,但开发不需要你来做。
4、IOS/ANDROID的都需要,但如果你只有一种也可以商量。
1, PPT / PPTX format support to any kind of 2, only needs to support some simple animation, such as mobile, gradients. Of course, to support the better. 3, can do simple editing, painting lines, this need is to provide you with technical support from us to complete. In simple terms, we need to play when PPT, you can pause, and then do write and record operations such as painting, you need to provide technical support for the format, but the developers do not need you to do. 4, IOS / ANDROID are needed, but if you have only one you can talk.
it, United States
Your email address
Set your budget and timeframe
Outline your proposal
Get paid for your work
It's free to sign up and bid on jobs
It&s free to sign up, type in what you need & receive free quotes in seconds
Enter your project description here
Post a Project
I am a new user
I am a returning user为什么安卓的office软件看ppt都没有ios的流畅?_百度知道
为什么安卓的office软件看ppt都没有ios的流畅?
我有更好的答案
因为安卓碎片化十分严重,所以office软件不能单独对播放过程进行优化。但是iOS就不同了,iOS设备少,优化就很给力了,所以更加流畅。安卓推荐使用微软的office Mobile组件,功能更强大,体验会更好一些
采纳率:94%
来自团队:
为您推荐:
其他类似问题
换一换
回答问题,赢新手礼包
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。&nbsp>&nbsp
&nbsp>&nbsp
&nbsp>&nbsp
iOS PPT 转图片(UIImage)实现思路
摘要:公司最近提了个将PPT转成图片并显示需求,经过各种查资料终于实现,分享一下思路!首先一个UIView对象要转换成一张图片,我们可以使用如下代码:UIGraphicsBeginImageContext(boundsSize);[view.layerrenderInContext:UIGraphicsGetCurrentContext()];UIImage*image=UIGraphicsGetImageFromCurrentImageContext();UIGraphicsEn
公司最近提了个将 PPT 转成图片并显示需求,经过各种查资料终于实现,分享一下思路!
首先一个 UIView 对象要转换成一张图片,我们可以使用如下代码:
UIGraphicsBeginImageContext(boundsSize);
[view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
于是我想到了使用可以展示 ppt 文件的 UIWebView 来展示 ppt 文件:
NSString* filePath = [[NSBundle mainBundle] pathForResource:@&iOS& ofType:@&pptx&];
NSURL *fileUrl = [NSURL fileURLWithPath:filePath];
UIWebView *webView = [[UIWebView alloc] initWithFrame:self.view.frame];
webView.scalesPageToFit = YES;
webView.scrollView.minimumZoomScale = 0;
webView.scrollView.maximumZoomScale = 1;
webView.delegate =
[self.view addSubview:webView];
[webView loadRequest:[NSURLRequest requestWithURL:fileUrl]];
接下来就是将 UIWebView 的每一个 page 渲染成一张图片并保存!渲染思路如下:
打印webview 的 html ,并观察html 文件的结构
// 打印 html 文件
NSLog(@&%@&, [webView stringByEvaluatingJavaScriptFromString:@&document.body.innerHTML&]);
// html 结构
观察 html 文件我们发现每一页 ppt 就是一个div,所以我们可以使用iOS 调用 js 代码获取到 ppt 的长宽,顶部位置以及 ppt 的总页数等属性
NSUInteger pageCount = [[webView stringByEvaluatingJavaScriptFromString:@&document.getElementsByClassName('slide').length&] intValue];
CGFloat height = [[webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@&document.getElementsByClassName('slide')[%li].style.height&, _currentPage]] floatValue];
CGFloat width= [[webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@&document.getElementsByClassName('slide')[%li].style.width&, _currentPage]] floatValue];
CGFloat offset = [[webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@&document.getElementsByClassName('slide')[%li].style.top&, _currentPage]] floatValue];
获取到这些属性后,我们可以设置webView的大小为 pdf 页面的大小,webView 的 scrollView 的contentOffset,设置 webView 显示的偏移。使用如下代码为每一页生成 UIImage
webView.bounds = CGRectMake(0, 0, width, height);
[webView.scrollView setContentOffset:CGPointMake(0, offset)];
UIGraphicsBeginImageContext(boundsSize);
[view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
以上可实现 PPT 转成图片功能
然而经压力测试发现黑屏闪退
md,内存泄露!通过 instrument 测试发现 [view.layer renderInContext:UIGraphicsGetCurrentContext()];内存一直不释放!oh my god!查资料得出的思路
self.view.layer.contents =
然而并没有卵用借鉴查找到的思路,最终我采取的策略是:每加载一次 webView 我只 render 一次, 移除掉 webView 然后再加载 webView 再 render
[webview removeFromSuperview];
NSString* filePath = [[NSBundle mainBundle] pathForResource:@&iOS& ofType:@&pptx&];
NSURL *fileUrl = [NSURL fileURLWithPath:filePath];
UIWebView *webView = [[UIWebView alloc] initWithFrame:self.view.frame];
webView.scalesPageToFit = YES;
webView.scrollView.minimumZoomScale = 0;
webView.scrollView.maximumZoomScale = 1;
webView.delegate =
[self.view addSubview:webView];
[webView loadRequest:[NSURLRequest requestWithURL:fileUrl]];
这种做法虽然效率很低但是闪退的问题解决了!当然也可以将粒度调高一点,比如每加载一次 webView,render 5页或者10页,这个可以根据个人需求去优化!
以上是的内容,更多
的内容,请您使用右上方搜索功能获取相关信息。
若你要投稿、删除文章请联系邮箱:zixun-group@service.aliyun.com,工作人员会在五个工作日内给你回复。
云服务器 ECS
可弹性伸缩、安全稳定、简单易用
&40.8元/月起
预测未发生的攻击
&24元/月起
为您提供0门槛上云实践机会
你可能还喜欢
你可能感兴趣
阿里云教程中心为您免费提供
iOS PPT 转图片(UIImage)实现思路相关信息,包括
的信息,所有iOS PPT 转图片(UIImage)实现思路相关内容均不代表阿里云的意见!投稿删除文章请联系邮箱:zixun-group@service.aliyun.com,工作人员会在五个工作日内答复
售前咨询热线
支持与服务
资源和社区
关注阿里云
International}

我要回帖

更多关于 iosppt 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信