使iOS文件输入直接进入相机应用程序? [英] Making an iOS file input go directly to the camera app?

查看:234
本文介绍了使iOS文件输入直接进入相机应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

背景:在撰写本文时,iOS 6.1不允许多个文件选择和在单个输入中拍摄照片。



由于我的主应用程序已经有一个多输入选择器选择文件,我想添加一个第二个按钮(只需要,只显示在iOS设备上启动相机。



目前适用于:

 < input type = fileclass =ios_onlyaccept =image / *; capture = camera>然而,iOS Safari总是提供以下对话框:


>



有没有办法< input> 可以直接进入相机而没有这个提示?

解决方案

不,你不能。 Safari将此处理为 UIImagePickerView ,并且必须通过此 UIActionSheet 选择源。



对于您的信息,此行具有相同的效果:

  < input type =fileclass =ios_onlyaccept =image / *capture =camera> 

也在iOS 7中测试。


Background: iOS 6.1, at the time of writing, doesn't allow both multiple file selection and taking a photo in a single input.

Since my main app already has a multiple input picker for choosing files, I'd like to add a second button (only required by, and only shown on) iOS devices to start the camera.

This currently works with:

<input type="file" class="ios_only" accept="image/*;capture=camera">

However iOS Safari always gives the following dialog:

Is there a way the <input> can be made to go directly to the camera without this prompt?

解决方案

No, you can't. Safari handles this as an UIImagePickerView and has to choose the source by this UIActionSheet.

For your information, this line has the same effect:

<input type="file" class="ios_only" accept="image/*" capture="camera">

Tested also in iOS 7.

这篇关于使iOS文件输入直接进入相机应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆