本文介绍了另一种情况 - 加载演示文稿的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我的移动应用主题就像移动设备中的默认图库应用程序一样,应用了一些隐私设置。所有逻辑都已完成并且运行良好。但是,应用理想演示时面临的问题。当项目写入应用程序路径时,我们想要呈现UIActivityIndicatorview / MBProgressHud(来自Github),在app路径中创建的文件夹之间移动项目。 请参阅设计: //开始加载动画 for(item in items []){ //逻辑代码: //将项目写入应用程序路径的代码(类似于NSData的资产类型) //或用于在app路径中的文件夹之间移动项目的代码 //处理完最后一项后停止动画 } 然而,动画很快停止,因为我们知道同步发生文件操作和剩余编译。但是,我的应用程序需要一些演示来定义用户必须等到给定的操作未完成。 *我能为此要求做些什么? *如果GCD是方便的工具,GCD类型对我有用吗? 英文太弱了。请调整。 注意:项目是指照片和视频。My mobile app theme is just like default Gallery application in the mobile with some privacy settings applied. All logic's are done and works well. But, the problem facing when applying ideal presentation. We want to presenting the UIActivityIndicatorview / MBProgressHud(from Github) when the item's write to app path, move the items between folder which created in app path.See design:// start animation for loadingfor(item in items[]){// logic code:// code for write items to app path(like asset type to NSData)// or code for moving item's between folder which is in app path// stop animation after handle last item}However, the animation stopped quickly because we know that the file operation and remaining compilation synchronously happened. BUT, my app wants some presentation to defining the user must wait until the given operation not complete.* What could i do for this requirements?* If the GCD is handy tool means, which GCD type is helpful for me?Am too weak in English. Please adjust.NOTE: Item's means Photo's and video's.推荐答案 这篇关于另一种情况 - 加载演示文稿的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-18 18:10