Xamarin表单应用程序中的Ipad中后置摄像头无法正常工作 [英] Rear camera is not working in Ipad in Xamarin forms App

查看:111
本文介绍了Xamarin表单应用程序中的Ipad中后置摄像头无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Xam.Plugin.Media访问Xamarin表单应用程序中的相机和照片库.

I am using Xam.Plugin.Media to access camera and photo gallery in my Xamarin forms app.

它可以在iPhone和Android设备上运行,但不能在具有最新ios版本10.3的IPad上运行. 当我调用打开相机的功能时,屏幕将冻结.

Its working in IPhone and in Android devices but not working in IPad with latest ios version 10.3. The Screen will be freezed when I am calling the function to open Camera.

我也尝试了其他插件,但问题相同. 前置摄像头正在运行,但后置摄像头无法运行.

I tried other plugins also but the same issue. Front Camera is working but Rear camera is not working.

推荐答案

我在下面的链接中找到了解决此问题的方法.

I found the fix for this issue in below links.

https://github.com/jamesmontemagno/MediaPlugin/issues/173

尝试在其上展示后置摄像头时应用程序冻结iPad

实际上我在使用这段代码

Actually I was using this code

UISlider.Appearance.MinimumTrackTintColor = UIColor.Red.ColorWithAlpha(100);

UISlider.Appearance.MinimumTrackTintColor = UIColor.Red.ColorWithAlpha(100);

在ios中配置UISlider的外观.这是造成问题的原因. 通过删除这些行,相机可以在iphone和ipad上正常工作.

to configure some appearance of UISlider in ios. It was causing the issue. By removing these lines, camera is working fine in both iphone and Ipad.

这篇关于Xamarin表单应用程序中的Ipad中后置摄像头无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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