问题标签 [mobilecoreservices]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ios - iOS4 UIImagePickerController 不支持 mediaTypes = [NSArray arrayWithObject:(NSString *) kUTTypeMovie]?
在我的应用程序中,我想以视频模式打开相机。所以我编写了以下代码
此代码适用于 iPhone 3.1.3,但在 iOS4 上不起作用。我可以在 iOS4 上使用 UIImagePickerController 作为视频吗?
ios - 未找到符号:kUTTypeImage
我从苹果的文档中复制了一些代码——我得到了这两个错误:
我究竟做错了什么?
编辑:代码:
我认为错误是最后一个方法开始的地方,但我不确定。
您的帖子没有太多上下文来解释代码部分;请更清楚地解释您的情况。
ios - 使用未声明的标识符“kUTTypeMovie”
我收到错误消息 -使用未声明的标识符“kUTTypeMovie”
在下面的代码中 -
它出什么问题了?
ios - How to get All Extensions for UTType Image, Audio, and Video
Is there a way to get All of the different UTType extension types as Strings? I need them specifically for images, audio, and video.
I followed this answer, but it doesn't give me all of the extensions
The results are
The issue here is it doesn't return values like qt
or jpg
. For example I use the UIDocumentPickerViewController and when I select an image the returned url pathExtension is jpg
not jpeg
. If I wanted to know if the returned url was an image, and I compared its pathExtension to the types array above, it would say that it doesn't appear in the list.